123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785 |
- :github_url: hide
- .. meta::
- :keywords: text, input
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/LineEdit.xml.
- .. _class_LineEdit:
- LineEdit
- ========
- **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- An input field for single-line text.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **LineEdit** provides an input field for editing a single line of text.
- - When the **LineEdit** control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode.
- - To enter edit mode, click on the control with the mouse or press the ``ui_text_submit`` action (by default :kbd:`Enter` or :kbd:`Kp Enter`).
- - To exit edit mode, press ``ui_text_submit`` or ``ui_cancel`` (by default :kbd:`Escape`) actions.
- - Check :ref:`edit<class_LineEdit_method_edit>`, :ref:`unedit<class_LineEdit_method_unedit>`, :ref:`is_editing<class_LineEdit_method_is_editing>`, and :ref:`editing_toggled<class_LineEdit_signal_editing_toggled>` for more information.
- \ **Important:**\
- - Focusing the **LineEdit** with ``ui_focus_next`` (by default :kbd:`Tab`) or ``ui_focus_prev`` (by default :kbd:`Shift + Tab`) or :ref:`Control.grab_focus<class_Control_method_grab_focus>` still enters edit mode (for compatibility).
- \ **LineEdit** features many built-in shortcuts that are always 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:`Cmd + F`: Same as :kbd:`Right Arrow`, move the caret one character right
- - :kbd:`Cmd + B`: Same as :kbd:`Left Arrow`, move the caret one character left
- - :kbd:`Cmd + P`: Same as :kbd:`Up Arrow`, move the caret to the previous line
- - :kbd:`Cmd + N`: Same as :kbd:`Down Arrow`, move the caret to the next line
- - :kbd:`Cmd + D`: Same as :kbd:`Delete`, delete the character on the right side of caret
- - :kbd:`Cmd + H`: Same as :kbd:`Backspace`, delete the character on the left side of the caret
- - :kbd:`Cmd + A`: Same as :kbd:`Home`, move the caret to the beginning of the line
- - :kbd:`Cmd + 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
- \ **Note:** Caret movement shortcuts listed above are not affected by :ref:`shortcut_keys_enabled<class_LineEdit_property_shortcut_keys_enabled>`.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :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_interval<class_LineEdit_property_caret_blink_interval>` | ``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>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :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:`drag_and_drop_selection_enabled<class_LineEdit_property_drag_and_drop_selection_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:`select_all_on_focus<class_LineEdit_property_select_all_on_focus>` | ``false`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :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_TextServer_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`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- | :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` | :ref:`virtual_keyboard_type<class_LineEdit_property_virtual_keyboard_type>` | ``0`` |
- +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`apply_ime<class_LineEdit_method_apply_ime>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`cancel_ime<class_LineEdit_method_cancel_ime>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`clear<class_LineEdit_method_clear>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`delete_char_at_caret<class_LineEdit_method_delete_char_at_caret>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`delete_text<class_LineEdit_method_delete_text>`\ (\ from_column\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`deselect<class_LineEdit_method_deselect>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`edit<class_LineEdit_method_edit>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_LineEdit_method_get_menu>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_scroll_offset<class_LineEdit_method_get_scroll_offset>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_selected_text<class_LineEdit_method_get_selected_text>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :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_ime_text<class_LineEdit_method_has_ime_text>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_redo<class_LineEdit_method_has_redo>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_selection<class_LineEdit_method_has_selection>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_undo<class_LineEdit_method_has_undo>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`insert_text_at_caret<class_LineEdit_method_insert_text_at_caret>`\ (\ text\: :ref:`String<class_String>`\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_editing<class_LineEdit_method_is_editing>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_LineEdit_method_is_menu_visible>`\ (\ ) |const| |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`menu_option<class_LineEdit_method_menu_option>`\ (\ option\: :ref:`int<class_int>`\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`select<class_LineEdit_method_select>`\ (\ from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = -1\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`select_all<class_LineEdit_method_select_all>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`unedit<class_LineEdit_method_unedit>`\ (\ ) |
- +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Theme Properties
- ----------------
- .. table::
- :widths: auto
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- | :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(0, 0, 0, 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>` | |
- +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Signals
- -------
- .. _class_LineEdit_signal_editing_toggled:
- .. rst-class:: classref-signal
- **editing_toggled**\ (\ toggled_on\: :ref:`bool<class_bool>`\ ) :ref:`๐<class_LineEdit_signal_editing_toggled>`
- Emitted when the **LineEdit** switches in or out of edit mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_signal_text_change_rejected:
- .. rst-class:: classref-signal
- **text_change_rejected**\ (\ rejected_substring\: :ref:`String<class_String>`\ ) :ref:`๐<class_LineEdit_signal_text_change_rejected>`
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_signal_text_changed:
- .. rst-class:: classref-signal
- **text_changed**\ (\ new_text\: :ref:`String<class_String>`\ ) :ref:`๐<class_LineEdit_signal_text_changed>`
- Emitted when the text changes.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_signal_text_submitted:
- .. rst-class:: classref-signal
- **text_submitted**\ (\ new_text\: :ref:`String<class_String>`\ ) :ref:`๐<class_LineEdit_signal_text_submitted>`
- Emitted when the user presses the ``ui_text_submit`` action (by default: :kbd:`Enter` or :kbd:`Kp Enter`) while the **LineEdit** has focus.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_LineEdit_MenuItems:
- .. rst-class:: classref-enumeration
- enum **MenuItems**: :ref:`๐<enum_LineEdit_MenuItems>`
- .. _class_LineEdit_constant_MENU_CUT:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_CUT** = ``0``
- Cuts (copies and clears) the selected text.
- .. _class_LineEdit_constant_MENU_COPY:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_COPY** = ``1``
- Copies the selected text.
- .. _class_LineEdit_constant_MENU_PASTE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **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>`.
- .. _class_LineEdit_constant_MENU_CLEAR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_CLEAR** = ``3``
- Erases the whole **LineEdit** text.
- .. _class_LineEdit_constant_MENU_SELECT_ALL:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_SELECT_ALL** = ``4``
- Selects the whole **LineEdit** text.
- .. _class_LineEdit_constant_MENU_UNDO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_UNDO** = ``5``
- Undoes the previous action.
- .. _class_LineEdit_constant_MENU_REDO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_REDO** = ``6``
- Reverse the last undo action.
- .. _class_LineEdit_constant_MENU_SUBMENU_TEXT_DIR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_SUBMENU_TEXT_DIR** = ``7``
- ID of "Text Writing Direction" submenu.
- .. _class_LineEdit_constant_MENU_DIR_INHERITED:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_DIR_INHERITED** = ``8``
- Sets text direction to inherited.
- .. _class_LineEdit_constant_MENU_DIR_AUTO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_DIR_AUTO** = ``9``
- Sets text direction to automatic.
- .. _class_LineEdit_constant_MENU_DIR_LTR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_DIR_LTR** = ``10``
- Sets text direction to left-to-right.
- .. _class_LineEdit_constant_MENU_DIR_RTL:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_DIR_RTL** = ``11``
- Sets text direction to right-to-left.
- .. _class_LineEdit_constant_MENU_DISPLAY_UCC:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_DISPLAY_UCC** = ``12``
- Toggles control character display.
- .. _class_LineEdit_constant_MENU_SUBMENU_INSERT_UCC:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_SUBMENU_INSERT_UCC** = ``13``
- ID of "Insert Control Character" submenu.
- .. _class_LineEdit_constant_MENU_INSERT_LRM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_LRM** = ``14``
- Inserts left-to-right mark (LRM) character.
- .. _class_LineEdit_constant_MENU_INSERT_RLM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_RLM** = ``15``
- Inserts right-to-left mark (RLM) character.
- .. _class_LineEdit_constant_MENU_INSERT_LRE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_LRE** = ``16``
- Inserts start of left-to-right embedding (LRE) character.
- .. _class_LineEdit_constant_MENU_INSERT_RLE:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_RLE** = ``17``
- Inserts start of right-to-left embedding (RLE) character.
- .. _class_LineEdit_constant_MENU_INSERT_LRO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_LRO** = ``18``
- Inserts start of left-to-right override (LRO) character.
- .. _class_LineEdit_constant_MENU_INSERT_RLO:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_RLO** = ``19``
- Inserts start of right-to-left override (RLO) character.
- .. _class_LineEdit_constant_MENU_INSERT_PDF:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_PDF** = ``20``
- Inserts pop direction formatting (PDF) character.
- .. _class_LineEdit_constant_MENU_INSERT_ALM:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_ALM** = ``21``
- Inserts Arabic letter mark (ALM) character.
- .. _class_LineEdit_constant_MENU_INSERT_LRI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_LRI** = ``22``
- Inserts left-to-right isolate (LRI) character.
- .. _class_LineEdit_constant_MENU_INSERT_RLI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_RLI** = ``23``
- Inserts right-to-left isolate (RLI) character.
- .. _class_LineEdit_constant_MENU_INSERT_FSI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_FSI** = ``24``
- Inserts first strong isolate (FSI) character.
- .. _class_LineEdit_constant_MENU_INSERT_PDI:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_PDI** = ``25``
- Inserts pop direction isolate (PDI) character.
- .. _class_LineEdit_constant_MENU_INSERT_ZWJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_ZWJ** = ``26``
- Inserts zero width joiner (ZWJ) character.
- .. _class_LineEdit_constant_MENU_INSERT_ZWNJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_ZWNJ** = ``27``
- Inserts zero width non-joiner (ZWNJ) character.
- .. _class_LineEdit_constant_MENU_INSERT_WJ:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_WJ** = ``28``
- Inserts word joiner (WJ) character.
- .. _class_LineEdit_constant_MENU_INSERT_SHY:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_INSERT_SHY** = ``29``
- Inserts soft hyphen (SHY) character.
- .. _class_LineEdit_constant_MENU_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`MenuItems<enum_LineEdit_MenuItems>` **MENU_MAX** = ``30``
- Represents the size of the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_LineEdit_VirtualKeyboardType:
- .. rst-class:: classref-enumeration
- enum **VirtualKeyboardType**: :ref:`๐<enum_LineEdit_VirtualKeyboardType>`
- .. _class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
- Default text virtual keyboard.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_MULTILINE:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
- Multiline virtual keyboard.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
- Virtual number keypad, useful for PIN entry.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
- Virtual number keypad, useful for entering fractional numbers.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_PHONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
- Virtual phone number keypad.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
- Virtual keyboard with additional keys to assist with typing email addresses.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_PASSWORD:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
- Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
- \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT>`.
- .. _class_LineEdit_constant_KEYBOARD_TYPE_URL:
- .. rst-class:: classref-enumeration-constant
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
- Virtual keyboard with additional keys to assist with typing URLs.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_LineEdit_property_alignment:
- .. rst-class:: classref-property
- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` :ref:`๐<class_LineEdit_property_alignment>`
- .. rst-class:: classref-property-setget
- - |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ )
- - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ )
- Text alignment as defined in the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_caret_blink:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_blink** = ``false`` :ref:`๐<class_LineEdit_property_caret_blink>`
- .. rst-class:: classref-property-setget
- - |void| **set_caret_blink_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_caret_blink_enabled**\ (\ )
- If ``true``, makes the caret blink.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_caret_blink_interval:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **caret_blink_interval** = ``0.65`` :ref:`๐<class_LineEdit_property_caret_blink_interval>`
- .. rst-class:: classref-property-setget
- - |void| **set_caret_blink_interval**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_caret_blink_interval**\ (\ )
- The interval at which the caret blinks (in seconds).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_caret_column:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **caret_column** = ``0`` :ref:`๐<class_LineEdit_property_caret_column>`
- .. rst-class:: classref-property-setget
- - |void| **set_caret_column**\ (\ value\: :ref:`int<class_int>`\ )
- - :ref:`int<class_int>` **get_caret_column**\ (\ )
- The caret's column position inside the **LineEdit**. When set, the text may scroll to accommodate it.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_caret_force_displayed:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_force_displayed** = ``false`` :ref:`๐<class_LineEdit_property_caret_force_displayed>`
- .. rst-class:: classref-property-setget
- - |void| **set_caret_force_displayed**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_caret_force_displayed**\ (\ )
- If ``true``, the **LineEdit** will always show the caret, even if focus is lost.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_caret_mid_grapheme:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **caret_mid_grapheme** = ``false`` :ref:`๐<class_LineEdit_property_caret_mid_grapheme>`
- .. rst-class:: classref-property-setget
- - |void| **set_caret_mid_grapheme_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_clear_button_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **clear_button_enabled** = ``false`` :ref:`๐<class_LineEdit_property_clear_button_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_clear_button_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_clear_button_enabled**\ (\ )
- If ``true``, the **LineEdit** will show a clear button if :ref:`text<class_LineEdit_property_text>` is not empty, which can be used to clear the text quickly.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_context_menu_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **context_menu_enabled** = ``true`` :ref:`๐<class_LineEdit_property_context_menu_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_context_menu_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_context_menu_enabled**\ (\ )
- If ``true``, the context menu will appear when right-clicked.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_deselect_on_focus_loss_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` :ref:`๐<class_LineEdit_property_deselect_on_focus_loss_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_deselect_on_focus_loss_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled**\ (\ )
- If ``true``, the selected text will be deselected when focus is lost.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_drag_and_drop_selection_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` :ref:`๐<class_LineEdit_property_drag_and_drop_selection_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_drag_and_drop_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled**\ (\ )
- If ``true``, allow drag and drop of selected text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_draw_control_chars:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **draw_control_chars** = ``false`` :ref:`๐<class_LineEdit_property_draw_control_chars>`
- .. rst-class:: classref-property-setget
- - |void| **set_draw_control_chars**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **get_draw_control_chars**\ (\ )
- If ``true``, control characters are displayed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_editable:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **editable** = ``true`` :ref:`๐<class_LineEdit_property_editable>`
- .. rst-class:: classref-property-setget
- - |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_editable**\ (\ )
- If ``false``, existing text cannot be modified and new text cannot be added.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_expand_to_text_length:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **expand_to_text_length** = ``false`` :ref:`๐<class_LineEdit_property_expand_to_text_length>`
- .. rst-class:: classref-property-setget
- - |void| **set_expand_to_text_length_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_flat:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **flat** = ``false`` :ref:`๐<class_LineEdit_property_flat>`
- .. rst-class:: classref-property-setget
- - |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_flat**\ (\ )
- If ``true``, the **LineEdit** doesn't display decoration.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_language:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **language** = ``""`` :ref:`๐<class_LineEdit_property_language>`
- .. rst-class:: classref-property-setget
- - |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ )
- - :ref:`String<class_String>` **get_language**\ (\ )
- Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_max_length:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **max_length** = ``0`` :ref:`๐<class_LineEdit_property_max_length>`
- .. rst-class:: classref-property-setget
- - |void| **set_max_length**\ (\ value\: :ref:`int<class_int>`\ )
- - :ref:`int<class_int>` **get_max_length**\ (\ )
- Maximum number 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:
- .. 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_middle_mouse_paste_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true`` :ref:`๐<class_LineEdit_property_middle_mouse_paste_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_middle_mouse_paste_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_placeholder_text:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **placeholder_text** = ``""`` :ref:`๐<class_LineEdit_property_placeholder_text>`
- .. rst-class:: classref-property-setget
- - |void| **set_placeholder**\ (\ value\: :ref:`String<class_String>`\ )
- - :ref:`String<class_String>` **get_placeholder**\ (\ )
- Text shown when the **LineEdit** is empty. It is **not** the **LineEdit**'s default value (see :ref:`text<class_LineEdit_property_text>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_right_icon:
- .. rst-class:: classref-property
- :ref:`Texture2D<class_Texture2D>` **right_icon** :ref:`๐<class_LineEdit_property_right_icon>`
- .. rst-class:: classref-property-setget
- - |void| **set_right_icon**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
- - :ref:`Texture2D<class_Texture2D>` **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``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_secret:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **secret** = ``false`` :ref:`๐<class_LineEdit_property_secret>`
- .. rst-class:: classref-property-setget
- - |void| **set_secret**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_secret**\ (\ )
- If ``true``, every character is replaced with the secret character (see :ref:`secret_character<class_LineEdit_property_secret_character>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_secret_character:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **secret_character** = ``"โข"`` :ref:`๐<class_LineEdit_property_secret_character>`
- .. rst-class:: classref-property-setget
- - |void| **set_secret_character**\ (\ value\: :ref:`String<class_String>`\ )
- - :ref:`String<class_String>` **get_secret_character**\ (\ )
- The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_select_all_on_focus:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **select_all_on_focus** = ``false`` :ref:`๐<class_LineEdit_property_select_all_on_focus>`
- .. rst-class:: classref-property-setget
- - |void| **set_select_all_on_focus**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_select_all_on_focus**\ (\ )
- If ``true``, the **LineEdit** will select the whole text when it gains focus.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_selecting_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **selecting_enabled** = ``true`` :ref:`๐<class_LineEdit_property_selecting_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_selecting_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_selecting_enabled**\ (\ )
- If ``false``, it's impossible to select the text using mouse nor keyboard.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_shortcut_keys_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` :ref:`๐<class_LineEdit_property_shortcut_keys_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_shortcut_keys_enabled**\ (\ )
- If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_structured_text_bidi_override:
- .. rst-class:: classref-property
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`๐<class_LineEdit_property_structured_text_bidi_override>`
- .. rst-class:: classref-property-setget
- - |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ )
- - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ )
- Set BiDi algorithm override for the structured text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_structured_text_bidi_override_options:
- .. rst-class:: classref-property
- :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`๐<class_LineEdit_property_structured_text_bidi_override_options>`
- .. rst-class:: classref-property-setget
- - |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ )
- - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ )
- Set additional options for BiDi override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_text:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **text** = ``""`` :ref:`๐<class_LineEdit_property_text>`
- .. rst-class:: classref-property-setget
- - |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ )
- - :ref:`String<class_String>` **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_text_direction:
- .. rst-class:: classref-property
- :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`๐<class_LineEdit_property_text_direction>`
- .. rst-class:: classref-property-setget
- - |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ )
- - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ )
- Base text writing direction.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_virtual_keyboard_enabled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true`` :ref:`๐<class_LineEdit_property_virtual_keyboard_enabled>`
- .. rst-class:: classref-property-setget
- - |void| **set_virtual_keyboard_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_virtual_keyboard_enabled**\ (\ )
- If ``true``, the native virtual keyboard is shown when focused on platforms that support it.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_property_virtual_keyboard_type:
- .. rst-class:: classref-property
- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **virtual_keyboard_type** = ``0`` :ref:`๐<class_LineEdit_property_virtual_keyboard_type>`
- .. rst-class:: classref-property-setget
- - |void| **set_virtual_keyboard_type**\ (\ value\: :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>`\ )
- - :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **get_virtual_keyboard_type**\ (\ )
- Specifies the type of virtual keyboard to show.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_LineEdit_method_apply_ime:
- .. rst-class:: classref-method
- |void| **apply_ime**\ (\ ) :ref:`๐<class_LineEdit_method_apply_ime>`
- Applies text from the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME) and closes the IME if it is open.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_cancel_ime:
- .. rst-class:: classref-method
- |void| **cancel_ime**\ (\ ) :ref:`๐<class_LineEdit_method_cancel_ime>`
- Closes the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME) if it is open. Any text in the IME will be lost.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_clear:
- .. rst-class:: classref-method
- |void| **clear**\ (\ ) :ref:`๐<class_LineEdit_method_clear>`
- Erases the **LineEdit**'s :ref:`text<class_LineEdit_property_text>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_delete_char_at_caret:
- .. rst-class:: classref-method
- |void| **delete_char_at_caret**\ (\ ) :ref:`๐<class_LineEdit_method_delete_char_at_caret>`
- Deletes one character at the caret's current position (equivalent to pressing :kbd:`Delete`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_delete_text:
- .. rst-class:: classref-method
- |void| **delete_text**\ (\ from_column\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) :ref:`๐<class_LineEdit_method_delete_text>`
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_deselect:
- .. rst-class:: classref-method
- |void| **deselect**\ (\ ) :ref:`๐<class_LineEdit_method_deselect>`
- Clears the current selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_edit:
- .. rst-class:: classref-method
- |void| **edit**\ (\ ) :ref:`๐<class_LineEdit_method_edit>`
- Allows entering edit mode whether the **LineEdit** is focused or not.
- Use :ref:`Callable.call_deferred<class_Callable_method_call_deferred>` if you want to enter edit mode on :ref:`text_submitted<class_LineEdit_signal_text_submitted>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_get_menu:
- .. rst-class:: classref-method
- :ref:`PopupMenu<class_PopupMenu>` **get_menu**\ (\ ) |const| :ref:`๐<class_LineEdit_method_get_menu>`
- Returns the :ref:`PopupMenu<class_PopupMenu>` of this **LineEdit**. By default, this menu is displayed when right-clicking on the **LineEdit**.
- You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see :ref:`MenuItems<enum_LineEdit_MenuItems>`). For example:
- .. tabs::
- .. code-tab:: gdscript
- func _ready():
- var menu = get_menu()
- # Remove all items after "Redo".
- menu.item_count = menu.get_item_index(MENU_REDO) + 1
- # Add custom items.
- menu.add_separator()
- menu.add_item("Insert Date", MENU_MAX + 1)
- # Connect callback.
- menu.id_pressed.connect(_on_item_pressed)
-
- func _on_item_pressed(id):
- if id == MENU_MAX + 1:
- insert_text_at_caret(Time.get_date_string_from_system())
- .. code-tab:: csharp
- public override void _Ready()
- {
- var menu = GetMenu();
- // Remove all items after "Redo".
- menu.ItemCount = menu.GetItemIndex(LineEdit.MenuItems.Redo) + 1;
- // Add custom items.
- menu.AddSeparator();
- menu.AddItem("Insert Date", LineEdit.MenuItems.Max + 1);
- // Add event handler.
- menu.IdPressed += OnItemPressed;
- }
-
- public void OnItemPressed(int id)
- {
- if (id == LineEdit.MenuItems.Max + 1)
- {
- InsertTextAtCaret(Time.GetDateStringFromSystem());
- }
- }
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_get_scroll_offset:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **get_scroll_offset**\ (\ ) |const| :ref:`๐<class_LineEdit_method_get_scroll_offset>`
- Returns the scroll offset due to :ref:`caret_column<class_LineEdit_property_caret_column>`, as a number of characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_get_selected_text:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_selected_text**\ (\ ) :ref:`๐<class_LineEdit_method_get_selected_text>`
- Returns the text inside the selection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_get_selection_from_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_from_column**\ (\ ) |const| :ref:`๐<class_LineEdit_method_get_selection_from_column>`
- Returns the selection begin column.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_get_selection_to_column:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selection_to_column**\ (\ ) |const| :ref:`๐<class_LineEdit_method_get_selection_to_column>`
- Returns the selection end column.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_has_ime_text:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_ime_text**\ (\ ) |const| :ref:`๐<class_LineEdit_method_has_ime_text>`
- Returns ``true`` if the user has text in the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_has_redo:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_redo**\ (\ ) |const| :ref:`๐<class_LineEdit_method_has_redo>`
- Returns ``true`` if a "redo" action is available.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_has_selection:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_selection**\ (\ ) |const| :ref:`๐<class_LineEdit_method_has_selection>`
- Returns ``true`` if the user has selected text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_has_undo:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_undo**\ (\ ) |const| :ref:`๐<class_LineEdit_method_has_undo>`
- Returns ``true`` if an "undo" action is available.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_insert_text_at_caret:
- .. rst-class:: classref-method
- |void| **insert_text_at_caret**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`๐<class_LineEdit_method_insert_text_at_caret>`
- Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_length<class_LineEdit_property_max_length>`, nothing happens.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_is_editing:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_editing**\ (\ ) |const| :ref:`๐<class_LineEdit_method_is_editing>`
- Returns whether the **LineEdit** is being edited.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_is_menu_visible:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_menu_visible**\ (\ ) |const| :ref:`๐<class_LineEdit_method_is_menu_visible>`
- Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_menu_option:
- .. rst-class:: classref-method
- |void| **menu_option**\ (\ option\: :ref:`int<class_int>`\ ) :ref:`๐<class_LineEdit_method_menu_option>`
- Executes a given action as defined in the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_select:
- .. rst-class:: classref-method
- |void| **select**\ (\ from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = -1\ ) :ref:`๐<class_LineEdit_method_select>`
- 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".
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_select_all:
- .. rst-class:: classref-method
- |void| **select_all**\ (\ ) :ref:`๐<class_LineEdit_method_select_all>`
- Selects the whole :ref:`String<class_String>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_method_unedit:
- .. rst-class:: classref-method
- |void| **unedit**\ (\ ) :ref:`๐<class_LineEdit_method_unedit>`
- Allows exiting edit mode while preserving focus.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Theme Property Descriptions
- ---------------------------
- .. _class_LineEdit_theme_color_caret_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **caret_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`๐<class_LineEdit_theme_color_caret_color>`
- Color of the **LineEdit**'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_clear_button_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **clear_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`๐<class_LineEdit_theme_color_clear_button_color>`
- Color used as default tint for the clear button.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_clear_button_color_pressed:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **clear_button_color_pressed** = ``Color(1, 1, 1, 1)`` :ref:`๐<class_LineEdit_theme_color_clear_button_color_pressed>`
- Color used for the clear button when it's pressed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_font_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`๐<class_LineEdit_theme_color_font_color>`
- Default font color.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_font_outline_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`๐<class_LineEdit_theme_color_font_outline_color>`
- The tint of text outline of the **LineEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_font_placeholder_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` :ref:`๐<class_LineEdit_theme_color_font_placeholder_color>`
- Font color for :ref:`placeholder_text<class_LineEdit_property_placeholder_text>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_font_selected_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐<class_LineEdit_theme_color_font_selected_color>`
- Font color for selected text (inside the selection rectangle).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_font_uneditable_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **font_uneditable_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`๐<class_LineEdit_theme_color_font_uneditable_color>`
- Font color when editing is disabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_color_selection_color:
- .. rst-class:: classref-themeproperty
- :ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` :ref:`๐<class_LineEdit_theme_color_selection_color>`
- Color of the selection rectangle.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_constant_caret_width:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **caret_width** = ``1`` :ref:`๐<class_LineEdit_theme_constant_caret_width>`
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_constant_minimum_character_width:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **minimum_character_width** = ``4`` :ref:`๐<class_LineEdit_theme_constant_minimum_character_width>`
- 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 number of 'M' characters can be displayed without scrolling).
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_constant_outline_size:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **outline_size** = ``0`` :ref:`๐<class_LineEdit_theme_constant_outline_size>`
- The size of the text outline.
- \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_LineEdit_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_font_font:
- .. rst-class:: classref-themeproperty
- :ref:`Font<class_Font>` **font** :ref:`๐<class_LineEdit_theme_font_font>`
- Font used for the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_font_size_font_size:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **font_size** :ref:`๐<class_LineEdit_theme_font_size_font_size>`
- Font size of the **LineEdit**'s text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_icon_clear:
- .. rst-class:: classref-themeproperty
- :ref:`Texture2D<class_Texture2D>` **clear** :ref:`๐<class_LineEdit_theme_icon_clear>`
- Texture for the clear button. See :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_style_focus:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **focus** :ref:`๐<class_LineEdit_theme_style_focus>`
- Background used when **LineEdit** has GUI focus. The :ref:`focus<class_LineEdit_theme_style_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_style_normal:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **normal** :ref:`๐<class_LineEdit_theme_style_normal>`
- Default background for the **LineEdit**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LineEdit_theme_style_read_only:
- .. rst-class:: classref-themeproperty
- :ref:`StyleBox<class_StyleBox>` **read_only** :ref:`๐<class_LineEdit_theme_style_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.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|