mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
dync classref with current source
This commit is contained in:
@@ -48,6 +48,20 @@ Description
|
||||
|
||||
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 :ref:`Range<class_Range>` class for more options over the ``SpinBox``.
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
@@ -61,6 +75,8 @@ Property Descriptions
|
||||
| *Getter* | get_align() |
|
||||
+----------+------------------+
|
||||
|
||||
Sets the text alignment of the ``SpinBox``.
|
||||
|
||||
.. _class_SpinBox_property_editable:
|
||||
|
||||
- :ref:`bool<class_bool>` **editable**
|
||||
@@ -71,6 +87,8 @@ Property Descriptions
|
||||
| *Getter* | is_editable() |
|
||||
+----------+---------------------+
|
||||
|
||||
If ``true``, the ``SpinBox`` will be editable. Otherwise, it will be read only.
|
||||
|
||||
.. _class_SpinBox_property_prefix:
|
||||
|
||||
- :ref:`String<class_String>` **prefix**
|
||||
@@ -81,6 +99,8 @@ Property Descriptions
|
||||
| *Getter* | get_prefix() |
|
||||
+----------+-------------------+
|
||||
|
||||
Adds the specified ``prefix`` string before the numerical value of the ``SpinBox``.
|
||||
|
||||
.. _class_SpinBox_property_suffix:
|
||||
|
||||
- :ref:`String<class_String>` **suffix**
|
||||
@@ -91,6 +111,8 @@ Property Descriptions
|
||||
| *Getter* | get_suffix() |
|
||||
+----------+-------------------+
|
||||
|
||||
Adds the specified ``prefix`` string after the numerical value of the ``SpinBox``.
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
@@ -98,3 +120,5 @@ Method Descriptions
|
||||
|
||||
- :ref:`LineEdit<class_LineEdit>` **get_line_edit** **(** **)**
|
||||
|
||||
Returns the :ref:`LineEdit<class_LineEdit>` instance from this ``SpinBox``. You can use it to access properties and methods of :ref:`LineEdit<class_LineEdit>`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user