summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/button.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/andlabs/button.go')
-rw-r--r--toolkit/andlabs/button.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/toolkit/andlabs/button.go b/toolkit/andlabs/button.go
index 741ce3a..1f9fdaf 100644
--- a/toolkit/andlabs/button.go
+++ b/toolkit/andlabs/button.go
@@ -10,27 +10,27 @@ import (
func newButton(a *toolkit.Action) {
var t, newt *andlabsT
var b *ui.Button
- w := a.Widget
- log(debugToolkit, "newButton()", w.Name)
+ log(debugToolkit, "newButton()", a.Name)
- t = mapToolkits[a.Where]
+ t = andlabs[a.ParentId]
if (t == nil) {
- log(debugToolkit, "newButton() toolkit struct == nil. name=", a.Where.Name, w.Name)
+ log(debugToolkit, "newButton() toolkit struct == nil. name=", a.Name)
return
}
newt = new(andlabsT)
- b = ui.NewButton(w.Name)
+ b = ui.NewButton(a.Text)
newt.uiButton = b
newt.uiControl = b
- newt.tw = w
+ newt.tw = a.Widget
+ newt.Type = a.WidgetType
newt.parent = t
b.OnClicked(func(*ui.Button) {
- newt.commonChange(newt.tw)
+ newt.commonChange(newt.tw, a.WidgetId)
})
place(a, t, newt)
- mapWidgetsToolkits(a, newt)
+ // mapWidgetsToolkits(a, newt)
}