summaryrefslogtreecommitdiff
path: root/andlabs/label.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 21:31:49 -0600
committerJeff Carr <[email protected]>2024-01-17 21:31:49 -0600
commit841e6252c95244f0ee7faf2c01d33f69a8ab483a (patch)
treeef400228622b87611168db2227269ba7fd56625d /andlabs/label.go
parentba95c13799740b5f55541fc5e8ab9f1d34f7e421 (diff)
common tree package for toolkitsv0.12.4
This update provides *lots* of toolkit updates. This will allow the next step of debugging the gocui toolkit to make it work again. There are new common routines for handling the plugin channel communication Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'andlabs/label.go')
-rw-r--r--andlabs/label.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/andlabs/label.go b/andlabs/label.go
index bcdaf7a..12bc9c1 100644
--- a/andlabs/label.go
+++ b/andlabs/label.go
@@ -1,18 +1,19 @@
package main
import (
- "go.wit.com/gui/widget"
+ "go.wit.com/gui/toolkits/tree"
"go.wit.com/dev/andlabs/ui"
_ "go.wit.com/dev/andlabs/ui/winmanifest"
)
-func (p *node) newLabel(n *node) {
+func newLabel(p, n *tree.Node) {
+ if notNew(n) { return }
newt := new(guiWidget)
- c := ui.NewLabel(widget.GetString(n.value))
+ c := ui.NewLabel(n.GetLabel())
newt.uiLabel = c
newt.uiControl = c
- n.tk = newt
- p.place(n)
+ n.TK = newt
+ place(p, n)
}