NODE: make NewGroup()
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a926aa300e
commit
25de1c5cdb
|
@ -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))
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue