diff options
| -rw-r--r-- | eventMouseClick.go | 4 | ||||
| -rw-r--r-- | node.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go index 3656e51..4ef2114 100644 --- a/eventMouseClick.go +++ b/eventMouseClick.go @@ -62,11 +62,11 @@ func doMouseClick(w int, h int) { case widget.Checkbox: if tk.Checked() { log.Log(WARN, "checkbox is being set to false") - tk.node.State.Checked = false + tk.SetChecked(false) tk.setCheckbox() } else { log.Log(WARN, "checkbox is being set to true") - tk.node.State.Checked = true + tk.SetChecked(true) tk.setCheckbox() } me.myTree.SendUserEvent(tk.node) @@ -57,3 +57,7 @@ func (tk *guiWidget) GridW() int { func (tk *guiWidget) GridH() int { return tk.node.State.AtH } + +func (tk *guiWidget) SetChecked(b bool) { + tk.node.State.Checked = b +} |
