package main

import (
	"go.wit.com/dev/andlabs/ui"
	_ "go.wit.com/dev/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) {
		n.value = newt.uiSpinbox.Value()
		n.doUserEvent()
	})

	n.tk = newt
	p.place(n)
}
