blob: 65bd7db7211c8da3d599bbd882d2de7ef881daa9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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)
}
|