1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the LineEdit.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_LineEdit:
- LineEdit
- ========
- **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Control that provides single-line string editing.
- Description
- -----------
- LineEdit provides a single-line string editor, used for text fields.
- It features many built-in shortcuts which will always be available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS):
- - :kbd:`Ctrl + C`: Copy
- - :kbd:`Ctrl + X`: Cut
- - :kbd:`Ctrl + V` or :kbd:`Ctrl + Y`: Paste/"yank"
- - :kbd:`Ctrl + Z`: Undo
- - :kbd:`Ctrl + ~`: Swap input direction.
- - :kbd:`Ctrl + Shift + Z`: Redo
- - :kbd:`Ctrl + U`: Delete text from the caret position to the beginning of the line
- - :kbd:`Ctrl + K`: Delete text from the caret position to the end of the line
- - :kbd:`Ctrl + A`: Select all text
- - :kbd:`Up Arrow`/:kbd:`Down Arrow`: Move the caret to the beginning/end of the line
- On macOS, some extra keyboard shortcuts are available:
- - :kbd:`Ctrl + F`: Same as :kbd:`Right Arrow`, move the caret one character right
- - :kbd:`Ctrl + B`: Same as :kbd:`Left Arrow`, move the caret one character left
- - :kbd:`Ctrl + P`: Same as :kbd:`Up Arrow`, move the caret to the previous line
- - :kbd:`Ctrl + N`: Same as :kbd:`Down Arrow`, move the caret to the next line
- - :kbd:`Ctrl + D`: Same as :kbd:`Delete`, delete the character on the right side of caret
- - :kbd:`Ctrl + H`: Same as :kbd:`Backspace`, delete the character on the left side of the caret
- - :kbd:`Ctrl + A`: Same as :kbd:`Home`, move the caret to the beginning of the line
- - :kbd:`Ctrl + E`: Same as :kbd:`End`, move the caret to the end of the line
- - :kbd:`Cmd + Left Arrow`: Same as :kbd:`Home`, move the caret to the beginning of the line
- - :kbd:`Cmd + Right Arrow`: Same as :kbd:`End`, move the caret to the end of the line
- Properties
- ----------
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`alignment<class_LineEdit_property_alignment>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_blink<class_LineEdit_property_caret_blink>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`caret_blink_speed<class_LineEdit_property_caret_blink_speed>` | ``0.65`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`caret_column<class_LineEdit_property_caret_column>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_force_displayed<class_LineEdit_property_caret_force_displayed>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_LineEdit_property_caret_mid_grapheme>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_LineEdit_property_context_menu_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_LineEdit_property_deselect_on_focus_loss_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`draw_control_chars<class_LineEdit_property_draw_control_chars>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`editable<class_LineEdit_property_editable>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`expand_to_text_length<class_LineEdit_property_expand_to_text_length>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`flat<class_LineEdit_property_flat>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`language<class_LineEdit_property_language>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`max_length<class_LineEdit_property_max_length>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`middle_mouse_paste_enabled<class_LineEdit_property_middle_mouse_paste_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`CursorShape<enum_Control_CursorShape>` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control<class_Control_property_mouse_default_cursor_shape>`) |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`placeholder_text<class_LineEdit_property_placeholder_text>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`Texture2D<class_Texture2D>` | :ref:`right_icon<class_LineEdit_property_right_icon>` | |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`secret<class_LineEdit_property_secret>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`secret_character<class_LineEdit_property_secret_character>` | ``"*"`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`selecting_enabled<class_LineEdit_property_selecting_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_LineEdit_property_shortcut_keys_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`StructuredTextParser<enum_Control_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_LineEdit_property_structured_text_bidi_override>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_LineEdit_property_structured_text_bidi_override_options>` | ``[]`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`text<class_LineEdit_property_text>` | ``""`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_LineEdit_property_text_direction>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`virtual_keyboard_enabled<class_LineEdit_property_virtual_keyboard_enabled>` | ``true`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- Methods
- -------
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear<class_LineEdit_method_clear>` **(** **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_opentype_features<class_LineEdit_method_clear_opentype_features>` **(** **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`delete_char_at_caret<class_LineEdit_method_delete_char_at_caret>` **(** **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`delete_text<class_LineEdit_method_delete_text>` **(** :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_column **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`deselect<class_LineEdit_method_deselect>` **(** **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_LineEdit_method_get_menu>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_opentype_feature<class_LineEdit_method_get_opentype_feature>` **(** :ref:`String<class_String>` tag **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_scroll_offset<class_LineEdit_method_get_scroll_offset>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_LineEdit_method_get_selection_from_column>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_LineEdit_method_get_selection_to_column>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_selection<class_LineEdit_method_has_selection>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`insert_text_at_caret<class_LineEdit_method_insert_text_at_caret>` **(** :ref:`String<class_String>` text **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_LineEdit_method_is_menu_visible>` **(** **)** |const| |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`menu_option<class_LineEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`select<class_LineEdit_method_select>` **(** :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=-1 **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`select_all<class_LineEdit_method_select_all>` **(** **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_opentype_feature<class_LineEdit_method_set_opentype_feature>` **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)** |
- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
- Theme Properties
- ----------------
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`caret_color<class_LineEdit_theme_color_caret_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`clear_button_color<class_LineEdit_theme_color_clear_button_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`clear_button_color_pressed<class_LineEdit_theme_color_clear_button_color_pressed>` | ``Color(1, 1, 1, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_color<class_LineEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_LineEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_LineEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_LineEdit_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`font_uneditable_color<class_LineEdit_theme_color_font_uneditable_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Color<class_Color>` | :ref:`selection_color<class_LineEdit_theme_color_selection_color>` | ``Color(0.5, 0.5, 0.5, 1)`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`caret_width<class_LineEdit_theme_constant_caret_width>` | ``1`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`minimum_character_width<class_LineEdit_theme_constant_minimum_character_width>` | ``4`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`outline_size<class_LineEdit_theme_constant_outline_size>` | ``0`` |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Font<class_Font>` | :ref:`font<class_LineEdit_theme_font_font>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_size<class_LineEdit_theme_font_size_font_size>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`Texture2D<class_Texture2D>` | :ref:`clear<class_LineEdit_theme_icon_clear>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_LineEdit_theme_style_focus>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_LineEdit_theme_style_normal>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_LineEdit_theme_style_read_only>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- Signals
- -------
- .. _class_LineEdit_signal_text_change_rejected:
- - **text_change_rejected** **(** :ref:`String<class_String>` rejected_substring **)**
- Emitted when appending text that overflows the :ref:`max_length<class_LineEdit_property_max_length>`. The appended text is truncated to fit :ref:`max_length<class_LineEdit_property_max_length>`, and the part that couldn't fit is passed as the ``rejected_substring`` argument.
- ----
- .. _class_LineEdit_signal_text_changed:
- - **text_changed** **(** :ref:`String<class_String>` new_text **)**
- Emitted when the text changes.
- ----
- .. _class_LineEdit_signal_text_submitted:
- - **text_submitted** **(** :ref:`String<class_String>` new_text **)**
- Emitted when the user presses :ref:`@GlobalScope.KEY_ENTER<class_@GlobalScope_constant_KEY_ENTER>` on the ``LineEdit``.
- Enumerations
- ------------
- .. _enum_LineEdit_MenuItems:
- .. _class_LineEdit_constant_MENU_CUT:
- .. _class_LineEdit_constant_MENU_COPY:
- .. _class_LineEdit_constant_MENU_PASTE:
- .. _class_LineEdit_constant_MENU_CLEAR:
- .. _class_LineEdit_constant_MENU_SELECT_ALL:
- .. _class_LineEdit_constant_MENU_UNDO:
- .. _class_LineEdit_constant_MENU_REDO:
- .. _class_LineEdit_constant_MENU_DIR_INHERITED:
- .. _class_LineEdit_constant_MENU_DIR_AUTO:
- .. _class_LineEdit_constant_MENU_DIR_LTR:
- .. _class_LineEdit_constant_MENU_DIR_RTL:
- .. _class_LineEdit_constant_MENU_DISPLAY_UCC:
- .. _class_LineEdit_constant_MENU_INSERT_LRM:
- .. _class_LineEdit_constant_MENU_INSERT_RLM:
- .. _class_LineEdit_constant_MENU_INSERT_LRE:
- .. _class_LineEdit_constant_MENU_INSERT_RLE:
- .. _class_LineEdit_constant_MENU_INSERT_LRO:
- .. _class_LineEdit_constant_MENU_INSERT_RLO:
- .. _class_LineEdit_constant_MENU_INSERT_PDF:
- .. _class_LineEdit_constant_MENU_INSERT_ALM:
- .. _class_LineEdit_constant_MENU_INSERT_LRI:
- .. _class_LineEdit_constant_MENU_INSERT_RLI:
- .. _class_LineEdit_constant_MENU_INSERT_FSI:
- .. _class_LineEdit_constant_MENU_INSERT_PDI:
- .. _class_LineEdit_constant_MENU_INSERT_ZWJ:
- .. _class_LineEdit_constant_MENU_INSERT_ZWNJ:
- .. _class_LineEdit_constant_MENU_INSERT_WJ:
- .. _class_LineEdit_constant_MENU_INSERT_SHY:
- .. _class_LineEdit_constant_MENU_MAX:
- enum **MenuItems**:
- - **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text.
- - **MENU_COPY** = **1** --- Copies the selected text.
- - **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the caret's position).
- Non-printable escape characters are automatically stripped from the OS clipboard via :ref:`String.strip_escapes<class_String_method_strip_escapes>`.
- - **MENU_CLEAR** = **3** --- Erases the whole ``LineEdit`` text.
- - **MENU_SELECT_ALL** = **4** --- Selects the whole ``LineEdit`` text.
- - **MENU_UNDO** = **5** --- Undoes the previous action.
- - **MENU_REDO** = **6** --- Reverse the last undo action.
- - **MENU_DIR_INHERITED** = **7** --- Sets text direction to inherited.
- - **MENU_DIR_AUTO** = **8** --- Sets text direction to automatic.
- - **MENU_DIR_LTR** = **9** --- Sets text direction to left-to-right.
- - **MENU_DIR_RTL** = **10** --- Sets text direction to right-to-left.
- - **MENU_DISPLAY_UCC** = **11** --- Toggles control character display.
- - **MENU_INSERT_LRM** = **12** --- Inserts left-to-right mark (LRM) character.
- - **MENU_INSERT_RLM** = **13** --- Inserts right-to-left mark (RLM) character.
- - **MENU_INSERT_LRE** = **14** --- Inserts start of left-to-right embedding (LRE) character.
- - **MENU_INSERT_RLE** = **15** --- Inserts start of right-to-left embedding (RLE) character.
- - **MENU_INSERT_LRO** = **16** --- Inserts start of left-to-right override (LRO) character.
- - **MENU_INSERT_RLO** = **17** --- Inserts start of right-to-left override (RLO) character.
- - **MENU_INSERT_PDF** = **18** --- Inserts pop direction formatting (PDF) character.
- - **MENU_INSERT_ALM** = **19** --- Inserts Arabic letter mark (ALM) character.
- - **MENU_INSERT_LRI** = **20** --- Inserts left-to-right isolate (LRI) character.
- - **MENU_INSERT_RLI** = **21** --- Inserts right-to-left isolate (RLI) character.
- - **MENU_INSERT_FSI** = **22** --- Inserts first strong isolate (FSI) character.
- - **MENU_INSERT_PDI** = **23** --- Inserts pop direction isolate (PDI) character.
- - **MENU_INSERT_ZWJ** = **24** --- Inserts zero width joiner (ZWJ) character.
- - **MENU_INSERT_ZWNJ** = **25** --- Inserts zero width non-joiner (ZWNJ) character.
- - **MENU_INSERT_WJ** = **26** --- Inserts word joiner (WJ) character.
- - **MENU_INSERT_SHY** = **27** --- Inserts soft hyphen (SHY) character.
- - **MENU_MAX** = **28** --- Represents the size of the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum.
- Property Descriptions
- ---------------------
- .. _class_LineEdit_property_alignment:
- - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment**
- +-----------+---------------------------------+
- | *Default* | ``0`` |
- +-----------+---------------------------------+
- | *Setter* | set_horizontal_alignment(value) |
- +-----------+---------------------------------+
- | *Getter* | get_horizontal_alignment() |
- +-----------+---------------------------------+
- Text alignment as defined in the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` enum.
- ----
- .. _class_LineEdit_property_caret_blink:
- - :ref:`bool<class_bool>` **caret_blink**
- +-----------+--------------------------------+
- | *Default* | ``false`` |
- +-----------+--------------------------------+
- | *Setter* | set_caret_blink_enabled(value) |
- +-----------+--------------------------------+
- | *Getter* | is_caret_blink_enabled() |
- +-----------+--------------------------------+
- If ``true``, the caret (text cursor) blinks.
- ----
- .. _class_LineEdit_property_caret_blink_speed:
- - :ref:`float<class_float>` **caret_blink_speed**
- +-----------+------------------------------+
- | *Default* | ``0.65`` |
- +-----------+------------------------------+
- | *Setter* | set_caret_blink_speed(value) |
- +-----------+------------------------------+
- | *Getter* | get_caret_blink_speed() |
- +-----------+------------------------------+
- Duration (in seconds) of a caret's blinking cycle.
- ----
- .. _class_LineEdit_property_caret_column:
- - :ref:`int<class_int>` **caret_column**
- +-----------+-------------------------+
- | *Default* | ``0`` |
- +-----------+-------------------------+
- | *Setter* | set_caret_column(value) |
- +-----------+-------------------------+
- | *Getter* | get_caret_column() |
- +-----------+-------------------------+
- The caret's column position inside the ``LineEdit``. When set, the text may scroll to accommodate it.
- ----
- .. _class_LineEdit_property_caret_force_displayed:
- - :ref:`bool<class_bool>` **caret_force_displayed**
- +-----------+----------------------------------+
- | *Default* | ``false`` |
- +-----------+----------------------------------+
- | *Setter* | set_caret_force_displayed(value) |
- +-----------+----------------------------------+
- | *Getter* | is_caret_force_displayed() |
- +-----------+----------------------------------+
- If ``true``, the ``LineEdit`` will always show the caret, even if focus is lost.
- ----
- .. _class_LineEdit_property_caret_mid_grapheme:
- - :ref:`bool<class_bool>` **caret_mid_grapheme**
- +-----------+---------------------------------------+
- | *Default* | ``true`` |
- +-----------+---------------------------------------+
- | *Setter* | set_caret_mid_grapheme_enabled(value) |
- +-----------+---------------------------------------+
- | *Getter* | is_caret_mid_grapheme_enabled() |
- +-----------+---------------------------------------+
- Allow moving caret, selecting and removing the individual composite character components.
- \ **Note:** :kbd:`Backspace` is always removing individual composite character components.
- ----
- .. _class_LineEdit_property_clear_button_enabled:
- - :ref:`bool<class_bool>` **clear_button_enabled**
- +-----------+---------------------------------+
- | *Default* | ``false`` |
- +-----------+---------------------------------+
- | *Setter* | set_clear_button_enabled(value) |
- +-----------+---------------------------------+
- | *Getter* | is_clear_button_enabled() |
- +-----------+---------------------------------+
- If ``true``, the ``LineEdit`` will show a clear button if ``text`` is not empty, which can be used to clear the text quickly.
- ----
- .. _class_LineEdit_property_context_menu_enabled:
- - :ref:`bool<class_bool>` **context_menu_enabled**
- +-----------+---------------------------------+
- | *Default* | ``true`` |
- +-----------+---------------------------------+
- | *Setter* | set_context_menu_enabled(value) |
- +-----------+---------------------------------+
- | *Getter* | is_context_menu_enabled() |
- +-----------+---------------------------------+
- If ``true``, the context menu will appear when right-clicked.
- ----
- .. _class_LineEdit_property_deselect_on_focus_loss_enabled:
- - :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled**
- +-----------+-------------------------------------------+
- | *Default* | ``true`` |
- +-----------+-------------------------------------------+
- | *Setter* | set_deselect_on_focus_loss_enabled(value) |
- +-----------+-------------------------------------------+
- | *Getter* | is_deselect_on_focus_loss_enabled() |
- +-----------+-------------------------------------------+
- If ``true``, the selected text will be deselected when focus is lost.
- ----
- .. _class_LineEdit_property_draw_control_chars:
- - :ref:`bool<class_bool>` **draw_control_chars**
- +-----------+-------------------------------+
- | *Default* | ``false`` |
- +-----------+-------------------------------+
- | *Setter* | set_draw_control_chars(value) |
- +-----------+-------------------------------+
- | *Getter* | get_draw_control_chars() |
- +-----------+-------------------------------+
- If ``true``, control characters are displayed.
- ----
- .. _class_LineEdit_property_editable:
- - :ref:`bool<class_bool>` **editable**
- +-----------+---------------------+
- | *Default* | ``true`` |
- +-----------+---------------------+
- | *Setter* | set_editable(value) |
- +-----------+---------------------+
- | *Getter* | is_editable() |
- +-----------+---------------------+
- If ``false``, existing text cannot be modified and new text cannot be added.
- ----
- .. _class_LineEdit_property_expand_to_text_length:
- - :ref:`bool<class_bool>` **expand_to_text_length**
- +-----------+------------------------------------------+
- | *Default* | ``false`` |
- +-----------+------------------------------------------+
- | *Setter* | set_expand_to_text_length_enabled(value) |
- +-----------+------------------------------------------+
- | *Getter* | is_expand_to_text_length_enabled() |
- +-----------+------------------------------------------+
- If ``true``, the ``LineEdit`` width will increase to stay longer than the :ref:`text<class_LineEdit_property_text>`. It will **not** compress if the :ref:`text<class_LineEdit_property_text>` is shortened.
- ----
- .. _class_LineEdit_property_flat:
- - :ref:`bool<class_bool>` **flat**
- +-----------+-----------------+
- | *Default* | ``false`` |
- +-----------+-----------------+
- | *Setter* | set_flat(value) |
- +-----------+-----------------+
- | *Getter* | is_flat() |
- +-----------+-----------------+
- If ``true``, the ``LineEdit`` don't display decoration.
- ----
- .. _class_LineEdit_property_language:
- - :ref:`String<class_String>` **language**
- +-----------+---------------------+
- | *Default* | ``""`` |
- +-----------+---------------------+
- | *Setter* | set_language(value) |
- +-----------+---------------------+
- | *Getter* | get_language() |
- +-----------+---------------------+
- Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
- ----
- .. _class_LineEdit_property_max_length:
- - :ref:`int<class_int>` **max_length**
- +-----------+-----------------------+
- | *Default* | ``0`` |
- +-----------+-----------------------+
- | *Setter* | set_max_length(value) |
- +-----------+-----------------------+
- | *Getter* | get_max_length() |
- +-----------+-----------------------+
- Maximum amount of characters that can be entered inside the ``LineEdit``. If ``0``, there is no limit.
- When a limit is defined, characters that would exceed :ref:`max_length<class_LineEdit_property_max_length>` are truncated. This happens both for existing :ref:`text<class_LineEdit_property_text>` contents when setting the max length, or for new text inserted in the ``LineEdit``, including pasting. If any input text is truncated, the :ref:`text_change_rejected<class_LineEdit_signal_text_change_rejected>` signal is emitted with the truncated substring as parameter.
- \ **Example:**\
- .. tabs::
- .. code-tab:: gdscript
- text = "Hello world"
- max_length = 5
- # `text` becomes "Hello".
- max_length = 10
- text += " goodbye"
- # `text` becomes "Hello good".
- # `text_change_rejected` is emitted with "bye" as parameter.
- .. code-tab:: csharp
- Text = "Hello world";
- MaxLength = 5;
- // `Text` becomes "Hello".
- MaxLength = 10;
- Text += " goodbye";
- // `Text` becomes "Hello good".
- // `text_change_rejected` is emitted with "bye" as parameter.
- ----
- .. _class_LineEdit_property_middle_mouse_paste_enabled:
- - :ref:`bool<class_bool>` **middle_mouse_paste_enabled**
- +-----------+---------------------------------------+
- | *Default* | ``true`` |
- +-----------+---------------------------------------+
- | *Setter* | set_middle_mouse_paste_enabled(value) |
- +-----------+---------------------------------------+
- | *Getter* | is_middle_mouse_paste_enabled() |
- +-----------+---------------------------------------+
- If ``false``, using middle mouse button to paste clipboard will be disabled.
- \ **Note:** This method is only implemented on Linux.
- ----
- .. _class_LineEdit_property_placeholder_text:
- - :ref:`String<class_String>` **placeholder_text**
- +-----------+------------------------+
- | *Default* | ``""`` |
- +-----------+------------------------+
- | *Setter* | set_placeholder(value) |
- +-----------+------------------------+
- | *Getter* | get_placeholder() |
- +-----------+------------------------+
- Text shown when the ``LineEdit`` is empty. It is **not** the ``LineEdit``'s default value (see :ref:`text<class_LineEdit_property_text>`).
- ----
- .. _class_LineEdit_property_right_icon:
- - :ref:`Texture2D<class_Texture2D>` **right_icon**
- +----------+-----------------------+
- | *Setter* | set_right_icon(value) |
- +----------+-----------------------+
- | *Getter* | get_right_icon() |
- +----------+-----------------------+
- Sets the icon that will appear in the right end of the ``LineEdit`` if there's no :ref:`text<class_LineEdit_property_text>`, or always, if :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>` is set to ``false``.
- ----
- .. _class_LineEdit_property_secret:
- - :ref:`bool<class_bool>` **secret**
- +-----------+-------------------+
- | *Default* | ``false`` |
- +-----------+-------------------+
- | *Setter* | set_secret(value) |
- +-----------+-------------------+
- | *Getter* | is_secret() |
- +-----------+-------------------+
- If ``true``, every character is replaced with the secret character (see :ref:`secret_character<class_LineEdit_property_secret_character>`).
- ----
- .. _class_LineEdit_property_secret_character:
- - :ref:`String<class_String>` **secret_character**
- +-----------+-----------------------------+
- | *Default* | ``"*"`` |
- +-----------+-----------------------------+
- | *Setter* | set_secret_character(value) |
- +-----------+-----------------------------+
- | *Getter* | get_secret_character() |
- +-----------+-----------------------------+
- The character to use to mask secret input (defaults to "\*"). Only a single character can be used as the secret character.
- ----
- .. _class_LineEdit_property_selecting_enabled:
- - :ref:`bool<class_bool>` **selecting_enabled**
- +-----------+------------------------------+
- | *Default* | ``true`` |
- +-----------+------------------------------+
- | *Setter* | set_selecting_enabled(value) |
- +-----------+------------------------------+
- | *Getter* | is_selecting_enabled() |
- +-----------+------------------------------+
- If ``false``, it's impossible to select the text using mouse nor keyboard.
- ----
- .. _class_LineEdit_property_shortcut_keys_enabled:
- - :ref:`bool<class_bool>` **shortcut_keys_enabled**
- +-----------+----------------------------------+
- | *Default* | ``true`` |
- +-----------+----------------------------------+
- | *Setter* | set_shortcut_keys_enabled(value) |
- +-----------+----------------------------------+
- | *Getter* | is_shortcut_keys_enabled() |
- +-----------+----------------------------------+
- If ``false``, using shortcuts will be disabled.
- ----
- .. _class_LineEdit_property_structured_text_bidi_override:
- - :ref:`StructuredTextParser<enum_Control_StructuredTextParser>` **structured_text_bidi_override**
- +-----------+------------------------------------------+
- | *Default* | ``0`` |
- +-----------+------------------------------------------+
- | *Setter* | set_structured_text_bidi_override(value) |
- +-----------+------------------------------------------+
- | *Getter* | get_structured_text_bidi_override() |
- +-----------+------------------------------------------+
- Set BiDi algorithm override for the structured text.
- ----
- .. _class_LineEdit_property_structured_text_bidi_override_options:
- - :ref:`Array<class_Array>` **structured_text_bidi_override_options**
- +-----------+--------------------------------------------------+
- | *Default* | ``[]`` |
- +-----------+--------------------------------------------------+
- | *Setter* | set_structured_text_bidi_override_options(value) |
- +-----------+--------------------------------------------------+
- | *Getter* | get_structured_text_bidi_override_options() |
- +-----------+--------------------------------------------------+
- Set additional options for BiDi override.
- ----
- .. _class_LineEdit_property_text:
- - :ref:`String<class_String>` **text**
- +-----------+-----------------+
- | *Default* | ``""`` |
- +-----------+-----------------+
- | *Setter* | set_text(value) |
- +-----------+-----------------+
- | *Getter* | get_text() |
- +-----------+-----------------+
- String value of the ``LineEdit``.
- \ **Note:** Changing text using this property won't emit the :ref:`text_changed<class_LineEdit_signal_text_changed>` signal.
- ----
- .. _class_LineEdit_property_text_direction:
- - :ref:`TextDirection<enum_Control_TextDirection>` **text_direction**
- +-----------+---------------------------+
- | *Default* | ``0`` |
- +-----------+---------------------------+
- | *Setter* | set_text_direction(value) |
- +-----------+---------------------------+
- | *Getter* | get_text_direction() |
- +-----------+---------------------------+
- Base text writing direction.
- ----
- .. _class_LineEdit_property_virtual_keyboard_enabled:
- - :ref:`bool<class_bool>` **virtual_keyboard_enabled**
- +-----------+-------------------------------------+
- | *Default* | ``true`` |
- +-----------+-------------------------------------+
- | *Setter* | set_virtual_keyboard_enabled(value) |
- +-----------+-------------------------------------+
- | *Getter* | is_virtual_keyboard_enabled() |
- +-----------+-------------------------------------+
- If ``true``, the native virtual keyboard is shown when focused on platforms that support it.
- Method Descriptions
- -------------------
- .. _class_LineEdit_method_clear:
- - void **clear** **(** **)**
- Erases the ``LineEdit``'s :ref:`text<class_LineEdit_property_text>`.
- ----
- .. _class_LineEdit_method_clear_opentype_features:
- - void **clear_opentype_features** **(** **)**
- Removes all OpenType features.
- ----
- .. _class_LineEdit_method_delete_char_at_caret:
- - void **delete_char_at_caret** **(** **)**
- Deletes one character at the caret's current position (equivalent to pressing :kbd:`Delete`).
- ----
- .. _class_LineEdit_method_delete_text:
- - void **delete_text** **(** :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_column **)**
- Deletes a section of the :ref:`text<class_LineEdit_property_text>` going from position ``from_column`` to ``to_column``. Both parameters should be within the text's length.
- ----
- .. _class_LineEdit_method_deselect:
- - void **deselect** **(** **)**
- Clears the current selection.
- ----
- .. _class_LineEdit_method_get_menu:
- - :ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const|
- Returns the :ref:`PopupMenu<class_PopupMenu>` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the ``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 :ref:`Window.visible<class_Window_property_visible>` property.
- ----
- .. _class_LineEdit_method_get_opentype_feature:
- - :ref:`int<class_int>` **get_opentype_feature** **(** :ref:`String<class_String>` tag **)** |const|
- Returns OpenType feature ``tag``.
- ----
- .. _class_LineEdit_method_get_scroll_offset:
- - :ref:`int<class_int>` **get_scroll_offset** **(** **)** |const|
- Returns the scroll offset due to :ref:`caret_column<class_LineEdit_property_caret_column>`, as a number of characters.
- ----
- .. _class_LineEdit_method_get_selection_from_column:
- - :ref:`int<class_int>` **get_selection_from_column** **(** **)** |const|
- Returns the selection begin column.
- ----
- .. _class_LineEdit_method_get_selection_to_column:
- - :ref:`int<class_int>` **get_selection_to_column** **(** **)** |const|
- Returns the selection end column.
- ----
- .. _class_LineEdit_method_has_selection:
- - :ref:`bool<class_bool>` **has_selection** **(** **)** |const|
- Returns ``true`` if the user has selected text.
- ----
- .. _class_LineEdit_method_insert_text_at_caret:
- - void **insert_text_at_caret** **(** :ref:`String<class_String>` text **)**
- Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_length<class_LineEdit_property_max_length>`, nothing happens.
- ----
- .. _class_LineEdit_method_is_menu_visible:
- - :ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const|
- Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
- ----
- .. _class_LineEdit_method_menu_option:
- - void **menu_option** **(** :ref:`int<class_int>` option **)**
- Executes a given action as defined in the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum.
- ----
- .. _class_LineEdit_method_select:
- - void **select** **(** :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=-1 **)**
- Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default, ``from`` is at the beginning and ``to`` at the end.
- .. tabs::
- .. code-tab:: gdscript
- text = "Welcome"
- select() # Will select "Welcome".
- select(4) # Will select "ome".
- select(2, 5) # Will select "lco".
- .. code-tab:: csharp
- Text = "Welcome";
- Select(); // Will select "Welcome".
- Select(4); // Will select "ome".
- Select(2, 5); // Will select "lco".
- ----
- .. _class_LineEdit_method_select_all:
- - void **select_all** **(** **)**
- Selects the whole :ref:`String<class_String>`.
- ----
- .. _class_LineEdit_method_set_opentype_feature:
- - void **set_opentype_feature** **(** :ref:`String<class_String>` tag, :ref:`int<class_int>` value **)**
- Returns OpenType feature ``tag``. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__.
- Theme Property Descriptions
- ---------------------------
- .. _class_LineEdit_theme_color_caret_color:
- - :ref:`Color<class_Color>` **caret_color**
- +-----------+--------------------------------+
- | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
- +-----------+--------------------------------+
- Color of the ``LineEdit``'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
- ----
- .. _class_LineEdit_theme_color_clear_button_color:
- - :ref:`Color<class_Color>` **clear_button_color**
- +-----------+-----------------------------------+
- | *Default* | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------+-----------------------------------+
- Color used as default tint for the clear button.
- ----
- .. _class_LineEdit_theme_color_clear_button_color_pressed:
- - :ref:`Color<class_Color>` **clear_button_color_pressed**
- +-----------+-----------------------+
- | *Default* | ``Color(1, 1, 1, 1)`` |
- +-----------+-----------------------+
- Color used for the clear button when it's pressed.
- ----
- .. _class_LineEdit_theme_color_font_color:
- - :ref:`Color<class_Color>` **font_color**
- +-----------+-----------------------------------+
- | *Default* | ``Color(0.875, 0.875, 0.875, 1)`` |
- +-----------+-----------------------------------+
- Default font color.
- ----
- .. _class_LineEdit_theme_color_font_outline_color:
- - :ref:`Color<class_Color>` **font_outline_color**
- +-----------+-----------------------+
- | *Default* | ``Color(1, 1, 1, 1)`` |
- +-----------+-----------------------+
- The tint of text outline of the ``LineEdit``.
- ----
- .. _class_LineEdit_theme_color_font_placeholder_color:
- - :ref:`Color<class_Color>` **font_placeholder_color**
- +-----------+-------------------------------------+
- | *Default* | ``Color(0.875, 0.875, 0.875, 0.6)`` |
- +-----------+-------------------------------------+
- Font color for :ref:`placeholder_text<class_LineEdit_property_placeholder_text>`.
- ----
- .. _class_LineEdit_theme_color_font_selected_color:
- - :ref:`Color<class_Color>` **font_selected_color**
- +-----------+-----------------------+
- | *Default* | ``Color(1, 1, 1, 1)`` |
- +-----------+-----------------------+
- Font color for selected text (inside the selection rectangle).
- ----
- .. _class_LineEdit_theme_color_font_uneditable_color:
- - :ref:`Color<class_Color>` **font_uneditable_color**
- +-----------+-------------------------------------+
- | *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` |
- +-----------+-------------------------------------+
- Font color when editing is disabled.
- ----
- .. _class_LineEdit_theme_color_selection_color:
- - :ref:`Color<class_Color>` **selection_color**
- +-----------+-----------------------------+
- | *Default* | ``Color(0.5, 0.5, 0.5, 1)`` |
- +-----------+-----------------------------+
- Color of the selection rectangle.
- ----
- .. _class_LineEdit_theme_constant_caret_width:
- - :ref:`int<class_int>` **caret_width**
- +-----------+-------+
- | *Default* | ``1`` |
- +-----------+-------+
- The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
- ----
- .. _class_LineEdit_theme_constant_minimum_character_width:
- - :ref:`int<class_int>` **minimum_character_width**
- +-----------+-------+
- | *Default* | ``4`` |
- +-----------+-------+
- Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
- ----
- .. _class_LineEdit_theme_constant_outline_size:
- - :ref:`int<class_int>` **outline_size**
- +-----------+-------+
- | *Default* | ``0`` |
- +-----------+-------+
- The size of the text outline.
- ----
- .. _class_LineEdit_theme_font_font:
- - :ref:`Font<class_Font>` **font**
- Font used for the text.
- ----
- .. _class_LineEdit_theme_font_size_font_size:
- - :ref:`int<class_int>` **font_size**
- Font size of the ``LineEdit``'s text.
- ----
- .. _class_LineEdit_theme_icon_clear:
- - :ref:`Texture2D<class_Texture2D>` **clear**
- Texture for the clear button. See :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>`.
- ----
- .. _class_LineEdit_theme_style_focus:
- - :ref:`StyleBox<class_StyleBox>` **focus**
- Background used when ``LineEdit`` has GUI focus. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
- ----
- .. _class_LineEdit_theme_style_normal:
- - :ref:`StyleBox<class_StyleBox>` **normal**
- Default background for the ``LineEdit``.
- ----
- .. _class_LineEdit_theme_style_read_only:
- - :ref:`StyleBox<class_StyleBox>` **read_only**
- Background used when ``LineEdit`` is in read-only mode (:ref:`editable<class_LineEdit_property_editable>` is set to ``false``).
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|