2024-01-01 16:11:54 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/andlabs/ui"
|
|
|
|
_ "github.com/andlabs/ui/winmanifest"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (p *node) newSpinner(n *node) {
|
|
|
|
newt := new(guiWidget)
|
|
|
|
|
|
|
|
s := ui.NewSpinbox(n.X, n.Y)
|
|
|
|
newt.uiSpinbox = s
|
|
|
|
newt.uiControl = s
|
|
|
|
|
|
|
|
s.OnChanged(func(s *ui.Spinbox) {
|
2024-01-11 17:19:47 -06:00
|
|
|
n.value = newt.uiSpinbox.Value()
|
2024-01-01 16:11:54 -06:00
|
|
|
n.doUserEvent()
|
|
|
|
})
|
|
|
|
|
|
|
|
n.tk = newt
|
|
|
|
p.place(n)
|
|
|
|
}
|