debian/andlabs/box.go

30 lines
462 B
Go
Raw Permalink Normal View History

2024-01-01 16:11:54 -06:00
package main
import (
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
)
// make new Box here
func (p *node) newBox(n *node) {
log(debugToolkit, "newBox()", n.Name)
newt := new(guiWidget)
var box *ui.Box
log(debugToolkit, "rawBox() create", n.Name)
if (n.B) {
box = ui.NewHorizontalBox()
} else {
box = ui.NewVerticalBox()
}
box.SetPadded(padded)
newt.uiBox = box
newt.uiControl = box
newt.boxC = 0
n.tk = newt
p.place(n)
}