summaryrefslogtreecommitdiff
path: root/andlabs/combobox.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-13 21:28:41 -0600
committerJeff Carr <[email protected]>2024-01-13 21:28:41 -0600
commit31dbec2b5610ae4ef5016189199085c9eea7f865 (patch)
treeb1feb5aaaf431bfe19ba35478d140b8593f9abad /andlabs/combobox.go
parent34f33db94a04ecb24087713a87556a9672b74aa7 (diff)
hidden widgets
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'andlabs/combobox.go')
-rw-r--r--andlabs/combobox.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/andlabs/combobox.go b/andlabs/combobox.go
index cc3603e..3a25692 100644
--- a/andlabs/combobox.go
+++ b/andlabs/combobox.go
@@ -5,6 +5,7 @@ import (
_ "github.com/andlabs/ui/winmanifest"
"go.wit.com/log"
+ "go.wit.com/gui/widget"
)
func (p *node) newCombobox(n *node) {
@@ -26,9 +27,17 @@ func (p *node) newCombobox(n *node) {
n.tk = newt
p.place(n)
+
+ // add the initial dropdown entries
+ for i, s := range n.strings {
+ log.Warn("add dropdown entries on create", i, s)
+ n.addDropdownName(s)
+ }
+ cur := widget.GetString(n.value)
+ n.tk.addComboboxName(cur)
}
-func (t *guiWidget) AddComboboxName(title string) {
+func (t *guiWidget) addComboboxName(title string) {
t.uiEditableCombobox.Append(title)
if (t.val == nil) {
return