diff options
| author | Jeff Carr <[email protected]> | 2023-04-06 20:25:14 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-06 20:25:14 -0500 |
| commit | 933a7e4df0e6a28ad06dfd60ab2928d5cdf916f9 (patch) | |
| tree | 268ad3d290b392f877963a6fdc82197168f51fc4 /toolkit/andlabs/button.go | |
| parent | 8649f37a56bc31928d69077545f1e323a794c61a (diff) | |
andlabs: callback is now safe through a go channel
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/button.go')
| -rw-r--r-- | toolkit/andlabs/button.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/toolkit/andlabs/button.go b/toolkit/andlabs/button.go index 94e2966..bc58da2 100644 --- a/toolkit/andlabs/button.go +++ b/toolkit/andlabs/button.go @@ -23,14 +23,15 @@ func newButton(a *toolkit.Action) { b = ui.NewButton(a.Text) newt.uiButton = b newt.uiControl = b - newt.tw = a.Widget + newt.wId = a.WidgetId + // newt.tw = a.Widget newt.WidgetType = a.WidgetType newt.parent = t + place(a, t, newt) + b.OnClicked(func(*ui.Button) { - newt.commonChange(newt.tw, a.WidgetId) + newt.doUserEvent() }) - place(a, t, newt) - // mapWidgetsToolkits(a, newt) } |
