diff --git a/window-debug.go b/window-debug.go index 4b8abb5..e87d0dc 100644 --- a/window-debug.go +++ b/window-debug.go @@ -2,6 +2,8 @@ package gui import ( "log" + // "fmt" + "strconv" "github.com/andlabs/ui" _ "github.com/andlabs/ui/winmanifest" @@ -243,7 +245,7 @@ func makeWindowDebug() *ui.Box { log.Println("nodeNames[y] =", nodeNames[y]) node := Data.findId(nodeNames[y]) if (node != nil) { - node.AddDemoTab("added this DemoTab") + node.AddDemoTab("ran gui.AddDemoTab() " + strconv.Itoa(Config.counter)) } }) diff --git a/window-demo.go b/window-demo.go index 7f964ef..92e89e8 100644 --- a/window-demo.go +++ b/window-demo.go @@ -14,7 +14,9 @@ func (n *Node) AddDemoTab(title string) { tabSetMargined(newNode.uiTab) newNode.Dump() newNode.ListChildren(false) - addDemoGroup(newNode.uiBox) + addDemoGroup(newNode, "new group 1") + addDemoGroup(newNode, "new group 2") + addDemoGroup(newNode, "new group 3") } func makeDemoTab() *ui.Box { @@ -45,11 +47,12 @@ func makeDemoTab() *ui.Box { return hbox } -func addDemoGroup(hbox *ui.Box) { +func addDemoGroup(n *Node, title string) { + hbox := n.uiBox if (hbox == nil) { return } - group := ui.NewGroup("DemoEditBox 2") + group := ui.NewGroup(title) group.SetMargined(true) hbox.Append(group, true)