summaryrefslogtreecommitdiff
path: root/window-template.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-25 05:25:10 -0500
committerJeff Carr <[email protected]>2021-10-25 05:25:10 -0500
commitcbb777cb3dabee7fd7a9979bf4690a4ebf593666 (patch)
treeec63d5e221cc53984cba38f3dcfb35e1a9c4e343 /window-template.go
parent4e5c26419d6c411ba04c57cb7b8062e73f695cec (diff)
EXAMPLE: correctly add a tab to the example app
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window-template.go')
-rw-r--r--window-template.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/window-template.go b/window-template.go
index c3e30ef..82162dd 100644
--- a/window-template.go
+++ b/window-template.go
@@ -4,6 +4,14 @@ import "log"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
+func (n *Node) AddDemoTab(title string) {
+ newNode := n.AddTab(title, makeWindowTemplate())
+ if (Config.DebugNode) {
+ newNode.Dump()
+ }
+ tabSetMargined(newNode.uiTab)
+}
+
func makeWindowTemplate() ui.Control {
hbox := ui.NewHorizontalBox()
hbox.SetPadded(true)