Struct SpinBox
Numerical input text field.
struct SpinBox
;
SpinBox is a numerical input text field. It allows entering integers and floats. Example:
var spin_box = SpinBox.new() add_child(spin_box) var line_edit = spin_box.get_line_edit() line_edit.context_menu_enabled = false spin_box.align = LineEdit.ALIGN_RIGHT
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.
Properties
| Name | Type | Description |
|---|---|---|
_align[get, set]
|
LineEdit | Sets the text alignment of the SpinBox.
|
editable[get, set]
|
bool | If true, the SpinBox will be editable. Otherwise, it will be read only.
|
prefix[get, set]
|
String | Adds the specified prefix string before the numerical value of the SpinBox.
|
suffix[get, set]
|
String | Adds the specified prefix string after the numerical value of the SpinBox.
|
Methods
| Name | Description |
|---|---|
_guiInput
|
|
_lineEditFocusExit
|
|
_lineEditInput
|
|
_rangeClickTimeout
|
|
_textEntered
|
|
apply
|
Applies the current value of this SpinBox.
|
getAlign
|
|
getLineEdit
|
Returns the LineEdit instance from this SpinBox. You can use it to access properties and methods of LineEdit.
|
getPrefix
|
|
getSuffix
|
|
isEditable
|
|
setAlign
|
|
setEditable
|
|
setPrefix
|
|
setSuffix
|