From f48b950655f57cb02bbd754ba0043a953956f888 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 19 Jan 2024 12:18:11 -0600 Subject: things are moving to widget.State pass borderless windows correctly destroy themselves from the binary tree checkbox state cleanups Signed-off-by: Jeff Carr --- checkbox.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'checkbox.go') 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) +} -- cgit v1.2.3