summaryrefslogtreecommitdiff
path: root/textbox.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-13 22:02:12 -0600
committerJeff Carr <[email protected]>2024-01-13 22:02:12 -0600
commit47b15946de10a75cda026a7317a90d4857b453c8 (patch)
treeab6a8c085226263982d3b19f2913e540707af2a1 /textbox.go
parent4ef8409eeadcd4a359b7593b5ea35f9f523bfb64 (diff)
work on hiding widgetsv0.12.5
When widgets are hidden, their state works exactly the same as normal, but updates are not sent to the toolkits Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'textbox.go')
-rw-r--r--textbox.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/textbox.go b/textbox.go
index 16837c0..d6ae8a4 100644
--- a/textbox.go
+++ b/textbox.go
@@ -8,20 +8,22 @@ import (
func (parent *Node) NewTextbox(name string) *Node {
newNode := parent.newNode(name, widget.Textbox)
+ newNode.value = name
+ newNode.progname = name
newNode.Custom = func() {
log.Log(GUI, "NewTextbox changed =", name)
}
- if ! newNode.hidden {
- a := newAction(newNode, widget.Add)
- sendAction(a)
- }
+ // inform the toolkits
+ sendAction(newNode, widget.Add)
return newNode
}
func (parent *Node) NewEntryLine(name string) *Node {
newNode := parent.newNode(name, widget.Textbox)
+ newNode.value = name
+ newNode.progname = name
newNode.X = 1
@@ -29,9 +31,7 @@ func (parent *Node) NewEntryLine(name string) *Node {
log.Log(GUI, "NewTextbox changed =", name)
}
- if ! newNode.hidden {
- a := newAction(newNode, widget.Add)
- sendAction(a)
- }
+ // inform the toolkits
+ sendAction(newNode, widget.Add)
return newNode
}