debian/andlabs/button.go

24 lines
340 B
Go
Raw Normal View History

2024-01-01 16:11:54 -06:00
package main
import (
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
)
func (p *node) newButton(n *node) {
t := p.tk
newt := new(guiWidget)
b := ui.NewButton(getString(n.value))
2024-01-01 16:11:54 -06:00
newt.uiButton = b
newt.uiControl = b
newt.parent = t
b.OnClicked(func(*ui.Button) {
n.doUserEvent()
})
n.tk = newt
p.place(n)
}