### Spinner Control Field

Example TextField as Spinner Control using a JavaObject - not using ControlsFX.
Reference: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Spinner.html
SpinnerTextField defined as JavaObject:
Private joSpinner As JavaObject
'Add a SpinnerTextField to the RootPane
`Sub AddSpinner
Dim spMin As Double = 0
Dim spMax As Double = 10
Dim spInitialValue As Double = 5
Dim spAmountToStepBy As Double = 1
joSpinner.InitializeNewInstance("javafx.scene.control.Spinner", Array(spMin, spMax, spInitialValue, spAmountToStepBy))
MainForm.RootPane.AddNode(joSpinner, 20, 100, 100, 20)
End Sub`
'Get the value of the SpinnerTextField
`Sub GetSpinnerValue As Double
Return joSpinner.RunMethodJO("getValueFactory", Null).RunMethod("getValue", Null)
End Sub`
'Set the value of the SpinnerTextField
`Sub SetSpinnerValue(value As Double)
joSpinner.RunMethodJO("getValueFactory", Null).RunMethod("setValue", Array(value))
End Sub`

Changed: , Category: TextField, File: T6C262M1946.htm, ID: 1946