summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/combobox.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/andlabs/combobox.go')
-rw-r--r--toolkit/andlabs/combobox.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/andlabs/combobox.go b/toolkit/andlabs/combobox.go
index e200b3b..e7d51a7 100644
--- a/toolkit/andlabs/combobox.go
+++ b/toolkit/andlabs/combobox.go
@@ -6,11 +6,14 @@ import (
"git.wit.org/wit/gui/toolkit"
)
-func (t *andlabsT) newCombobox(w *toolkit.Widget) *andlabsT {
+func (t *andlabsT) newCombobox(a *toolkit.Action) *andlabsT {
var newt andlabsT
+ w := a.Widget
log(debugToolkit, "newCombobox() START", w.Name)
newt.tw = w
+ newt.wId = a.WidgetId
+ newt.Type = w.Type
s := ui.NewEditableCombobox()
newt.uiEditableCombobox = s
newt.uiControl = s
@@ -21,7 +24,7 @@ func (t *andlabsT) newCombobox(w *toolkit.Widget) *andlabsT {
s.OnChanged(func(spin *ui.EditableCombobox) {
newt.tw.S = spin.Text()
- newt.commonChange(newt.tw)
+ newt.commonChange(newt.tw, a.WidgetId)
})
return &newt
@@ -42,17 +45,14 @@ func (t *andlabsT) AddComboboxName(title string) {
}
func newCombobox(a *toolkit.Action) {
- w := a.Widget
- parentW := a.Where
- log(debugToolkit, "newCombobox()", w.Name)
+ log(debugToolkit, "newCombobox()", a.Name)
- t := mapToolkits[parentW]
+ t := andlabs[a.ParentId]
if (t == nil) {
- log(debugToolkit, "newCombobox() toolkit struct == nil. name=", parentW.Name, w.Name)
+ log(debugToolkit, "newCombobox() toolkit struct == nil. name=", a.Name)
listMap(debugToolkit)
return
}
- newt := t.newCombobox(w)
+ newt := t.newCombobox(a)
place(a, t, newt)
- mapWidgetsToolkits(a, newt)
}