diff options
| author | Jeff Carr <[email protected]> | 2022-10-16 10:09:16 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-16 10:09:16 -0500 |
| commit | 3a99ad8b44fd6b58deda4d985bd46e62f27638ba (patch) | |
| tree | 786245a6a226777eaafe058b673c178d0c379b9e /toolkit/andlabs/label.go | |
| parent | 2141e04328dcf4e4d6857fcc0a7cb551fc84fa07 (diff) | |
fix andlabs.ui.NewLabel()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/label.go')
| -rw-r--r-- | toolkit/andlabs/label.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/toolkit/andlabs/label.go b/toolkit/andlabs/label.go new file mode 100644 index 0000000..23d4927 --- /dev/null +++ b/toolkit/andlabs/label.go @@ -0,0 +1,23 @@ +package toolkit + +import "log" + +import "github.com/andlabs/ui" +import _ "github.com/andlabs/ui/winmanifest" + +func NewLabel(b *ui.Box, name string) *Toolkit { + // make new node here + log.Println("gui.Toolbox.NewLabel", name) + var t Toolkit + + if (b == nil) { + log.Println("gui.ToolboxNode.NewLabel() node.UiBox == nil. I can't add a range UI element without a place to put it") + return &t + } + l := ui.NewLabel(name) + t.uiLabel = l + t.uiBox = b + t.uiBox.Append(l, false) + + return &t +} |
