summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-01 11:59:21 -0600
committerJeff Carr <[email protected]>2024-02-01 11:59:21 -0600
commit732f3c60e9cc8405e73e9f70076e52043ce4fec8 (patch)
tree1993a15256203ff9119347f540c4badf19c357b2 /plugin.go
parent6fb1a5802ab574ad62261def50cae9cf677725ab (diff)
checkbox worksv0.19.0
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go8
1 files changed, 6 insertions, 2 deletions
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)
}
}