diff options
| author | Jeff Carr <[email protected]> | 2021-11-01 00:24:56 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-11-01 00:24:56 -0500 |
| commit | 97a80003b9fddc15c58bcb01f371c48c8f821751 (patch) | |
| tree | 4e56021076a2d6548ce3813bd6a60e42f20baf49 /new-structs.go | |
| parent | f5440782630ef7dd2b19a8b04df260a9a87cbba8 (diff) | |
CLEAN: out of the rabbit hole
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
| -rw-r--r-- | new-structs.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/new-structs.go b/new-structs.go index 8d7a203..92ce84a 100644 --- a/new-structs.go +++ b/new-structs.go @@ -234,6 +234,29 @@ func (n *Node) AddTabNode(title string) *Node { return newNode } +func (n *Node) AddHorizontalBox(title string) *Node { + hbox := ui.NewHorizontalBox() + hbox.SetPadded(true) + if (n.uiBox != nil) { + log.Println("add new hbox to uiBox =", n.uiBox) + n.uiBox.Append(hbox, false) + newNode := n.makeNode(title, 333, 333 + Config.counter) + newNode.parent = n + newNode.uiBox = hbox + // newNode.uiControl = hbox + return newNode + } + if (n.uiTab != nil) { + log.Println("add new hbox to uiTab =", n.uiTab) + n.uiTab.Append(title, hbox) + newNode := n.makeNode(title, 333, 333 + Config.counter) + newNode.parent = n + newNode.uiBox = hbox + // newNode.uiControl = hbox + return newNode + } + return n +} func (n *Node) AddTab(title string, uiC *ui.Box) *Node { parent := n log.Println("gui.Node.AddTab() START name =", title) |
