SpinBox is a numerical input text field. It allows entering integers and floating point numbers.
Example:
The above code will create a SpinBox, disable context menu on it and set the text alignment to right.
See Range class for more options over the SpinBox.
Changes the alignment of the underlying LineEdit.
If not 0
, Range.value will always be rounded to a multiple of custom_arrow_step when interacting with the arrow buttons of the SpinBox.
If true
, the SpinBox will be editable. Otherwise, it will be read only.
Adds the specified prefix string before the numerical value of the SpinBox.
If true
, the SpinBox will select the whole text when the LineEdit gains focus. Clicking the up and down arrows won't trigger this behavior.
Adds the specified suffix string after the numerical value of the SpinBox.
Sets the value of the Range for this SpinBox when the LineEdit text is changed instead of submitted. See LineEdit.text_changed and LineEdit.text_submitted.
Applies the current value of this SpinBox.
Returns the LineEdit instance from this SpinBox. You can use it to access properties and methods of LineEdit.
Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their CanvasItem.visible property.