From 732f3c60e9cc8405e73e9f70076e52043ce4fec8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 1 Feb 2024 11:59:21 -0600 Subject: checkbox works Signed-off-by: Jeff Carr --- plugin.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugin.go') diff --git a/plugin.go b/plugin.go index bc1fed8..37d9f9b 100644 --- a/plugin.go +++ b/plugin.go @@ -174,7 +174,11 @@ func (w *guiWidget) Set(val any) { log.Log(INFO, "Set() value =", val) w.value = val.(string) - if w.node.WidgetType != widget.Checkbox { - w.setCheckbox(val) + if w.node.WidgetType == widget.Checkbox { + w.node.State.Checked = widget.GetBool(val) + w.setCheckbox() + } + if w.node.WidgetType == widget.Label { + w.labelN = widget.GetString(val) } } -- cgit v1.2.3