diff options
| author | Jeff Carr <[email protected]> | 2022-10-17 11:56:43 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-17 11:56:43 -0500 |
| commit | aa93809facd61407c80e0d4472b02fb68edc41be (patch) | |
| tree | 49bcf010b37e20767503524ef1180c9664c67d39 /toolkit/andlabs/entry.go | |
| parent | 4bb18caa3ac7da14b7333d258b40b87272c9e65b (diff) | |
DEMO: add andlabs/ui demo window
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/entry.go')
| -rw-r--r-- | toolkit/andlabs/entry.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/toolkit/andlabs/entry.go b/toolkit/andlabs/entry.go new file mode 100644 index 0000000..c981732 --- /dev/null +++ b/toolkit/andlabs/entry.go @@ -0,0 +1,23 @@ +package toolkit + +import "log" + +import "github.com/andlabs/ui" +import _ "github.com/andlabs/ui/winmanifest" + +func NewEntry(b *ui.Box, name string) *Toolkit { + // make new node here + log.Println("gui.Toolbox.NewEntry", name) + var t Toolkit + + if (b == nil) { + log.Println("gui.ToolboxNode.NewEntry() node.UiBox == nil. I can't add a range UI element without a place to put it") + return &t + } + l := ui.NewEntry() + t.uiEntry = l + t.uiBox = b + t.uiBox.Append(l, false) + + return &t +} |
