diff options
| author | Jeff Carr <[email protected]> | 2024-01-19 12:18:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-19 12:18:11 -0600 |
| commit | f48b950655f57cb02bbd754ba0043a953956f888 (patch) | |
| tree | 7547dd1b167536fe9cb4c6f42e6675b5ac0d89d1 /checkbox.go | |
| parent | c2a563ae37d11f8374df6c7f00661369f4d5a76f (diff) | |
things are moving to widget.Statev0.0.9
pass borderless
windows correctly destroy themselves from the binary tree
checkbox state cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'checkbox.go')
| -rw-r--r-- | checkbox.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/checkbox.go b/checkbox.go index 326406e..3101507 100644 --- a/checkbox.go +++ b/checkbox.go @@ -3,6 +3,7 @@ package main import ( "go.wit.com/log" "go.wit.com/toolkits/tree" + "go.wit.com/widget" "go.wit.com/dev/andlabs/ui" _ "go.wit.com/dev/andlabs/ui/winmanifest" @@ -32,3 +33,12 @@ func newCheckbox(p *tree.Node, n *tree.Node) { func (t *guiWidget) checked() bool { return t.uiCheckbox.Checked() } + +func setChecked(n *tree.Node, b bool) { + if n.WidgetType != widget.Checkbox { + } + var tk *guiWidget + tk = n.TK.(*guiWidget) + + tk.uiCheckbox.SetChecked(b) +} |
