26 lines
447 B
Go
26 lines
447 B
Go
package main
|
|
|
|
import (
|
|
"go.wit.com/gui/toolkits/tree"
|
|
|
|
"go.wit.com/dev/andlabs/ui"
|
|
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
|
)
|
|
|
|
func newSpinner(p, n *tree.Node) {
|
|
if notNew(n) { return }
|
|
newt := new(guiWidget)
|
|
|
|
s := ui.NewSpinbox(n.State.Range.Low,n.State.Range.High)
|
|
newt.uiSpinbox = s
|
|
newt.uiControl = s
|
|
|
|
s.OnChanged(func(s *ui.Spinbox) {
|
|
n.SetValue(newt.uiSpinbox.Value())
|
|
me.myTree.DoUserEvent(n)
|
|
})
|
|
|
|
n.TK = newt
|
|
place(p, n)
|
|
}
|