LineEdit
Single-line field with selection, length limits and separate change/submission signals.
Use LineEdit for a name, search query or other single line; use TextEdit for multiline editing. Read Text as the value and PlaceholderText as a separate hint. Validate input under application rules: MaxLength limits length rather than allowed characters or meaning.
Assigning Text/SetText replaces the string, resets selection, caret and scrolling to the start, and clears previous edit history. It does not emit TextChanged. Populate a form by assigning Text and explicitly refreshing dependent controls; set CaretColumn after Text to position the caret at the end. Do not use C# string.Length as an engine index for strings containing non-BMP characters.
CaretColumn, Select and DeleteText positions count Unicode codepoints, not UTF-16 units or visible composite characters. For example, A😀é has 4 codepoints but string.Length = 5. Use GetNextCompositeCharacterColumn/GetPreviousCompositeCharacterColumn to step across a composite character. CaretColumn is clamped from 0 to text length.
Select(from, to) selects the half-open interval [from, to) without moving the caret. Negative to means end of text. Select(0, 0) deselects; reversed ranges or equal nonzero endpoints retain the previous selection. Check HasSelection before GetSelectionFromColumn/GetSelectionToColumn. Deselect does not change text.
InsertTextAtCaret inserts at the current position and advances the caret, but does not itself replace selection or emit TextChanged. To replace a selection, save its endpoints, deselect, call DeleteText, set CaretColumn to the range start, then insert. DeleteText changes Text immediately but schedules TextChanged for deferred delivery, coalescing multiple such deletions before notification. Clear emits immediately when the field was nonempty.
MaxLength = 0 means unlimited. Positive values limit codepoints. On overflow, the available prefix is accepted and TextChangeRejected receives the discarded tail. Setting MaxLength reapplies Text: it can truncate the string and resets position/selection even for the same limit. TextChangeRejected can occur during programmatic writes that do not emit TextChanged.
Editable = false prevents user editing but does not block programmatic SetText, InsertTextAtCaret, DeleteText or Clear. Secret masks display while retaining original Text; it is not encryption or protection against your code reading the value. TextSubmitted belongs to the ui_text_submit action (usually Enter), not Text assignment. Handle submission separately from changes and validate the value before saving.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
LineEditConstructor
public LineEdit();Creates an empty editable field: MaxLength = 0, caret 0, selection enabled, Secret disabled.
Properties36
AlignmentProperty
public HorizontalAlignment Alignment { get; set; }Horizontal alignment, default Left. Left/Right account for layout direction; Fill justifies through shaping rather than wrapping. Does not set CaretColumn.
BackspaceDeletesCompositeCharacterEnabledProperty
public bool BackspaceDeletesCompositeCharacterEnabled { get; set; }Delete a whole composite character before the caret when CaretMidGrapheme = false; default false removes one codepoint. Also affects DeleteCharAtCaret.
CaretBlinkProperty
public bool CaretBlink { get; set; }Caret blinking, default false. Enabling uses internal frame processing; visibility still depends on editing, focus or CaretForceDisplayed.
CaretBlinkIntervalProperty
public float CaretBlinkInterval { get; set; }Caret visibility-toggle interval in seconds, default 0.65. Supply a positive finite value; nonpositive values are rejected. Takes effect with CaretBlink = true.
CaretColumnProperty
public int CaretColumn { get; set; }Caret position in Unicode codepoints rather than UTF-16 index; default 0. Setter clamps to 0…text length and adjusts scrolling to show the caret when in the tree.
CaretForceDisplayedProperty
public bool CaretForceDisplayed { get; set; }Show the caret outside normal editing/focus conditions, default false. Does not start editing or enable Editable. Forced display does not apply to an element belonging to the edited scene.
CaretMidGraphemeProperty
public bool CaretMidGrapheme { get; set; }Allows caret movement within composite characters, default false. When true, DeleteCharAtCaret removes one codepoint even with composite deletion enabled. Direct CaretColumn assignment does not itself snap indices to grapheme boundaries.
ClearButtonEnabledProperty
public bool ClearButtonEnabled { get; set; }Built-in clear button, default false. Drawn for a nonempty editable field instead of RightIcon; its space contributes to minimum size even when empty. Clearing changes text rather than submitting it.
ContextMenuEnabledProperty
public bool ContextMenuEnabled { get; set; }Allows the standard context menu through user input, default true. false does not block GetMenu, direct MenuOption or code-driven text changes.
DeselectOnFocusLossEnabledProperty
public bool DeselectOnFocusLossEnabled { get; set; }Deselect on focus loss/end of editing, default true. Enabling also immediately deselects an already unfocused field. Drag operations have separate selection-retention conditions.
DragAndDropSelectionEnabledProperty
public bool DragAndDropSelectionEnabled { get; set; }Allows dragging selected text, default true. Separate from SelectingEnabled; does not block programmatic Select or Text writes.
DrawControlCharsProperty
public bool DrawControlChars { get; set; }Visualize control characters during shaping, default false. Does not add control characters to Text or change validation rules.
EditableProperty
public bool Editable { get; set; }Allows user editing, default true. false does not block programmatic text operations; disabling it during active editing ends editing.
EmojiMenuEnabledProperty
public bool EmojiMenuEnabled { get; set; }Allows the system emoji/symbol picker item in the standard menu, default true. Requires platform support; false does not prohibit emoji input or programmatic insertion.
ExpandToTextLengthProperty
public bool ExpandToTextLength { get; set; }Raises minimum width to shaped-text width plus caret space, default false. Can expand the parent container; leave false for a bounded-width field.
FlatProperty
public bool Flat { get; set; }Skip the normal/read_only background, default false. The separate focus style still draws; style margins and minimum size remain.
IconExpandModeProperty
public LineEdit.ExpandMode IconExpandMode { get; set; }Sizing for RightIcon and clear icon: OriginalSize uses source dimensions; FitToText uses a square at font height; FitToLineEdit fits field height with a width bound and applies RightIconScale. Default OriginalSize. FitToText does not preserve a nonsquare image’s aspect ratio.
KeepEditingOnTextSubmitProperty
public bool KeepEditingOnTextSubmit { get; set; }Continue editing after ui_text_submit, default false. Does not suppress TextSubmitted or validate the value.
LanguageProperty
public string Language { get; set; }Shaping language; default empty uses the control locale. Does not translate Text or switch application locale; supply a language code for correct script shaping.
MaxLengthProperty
public int MaxLength { get; set; }Maximum Unicode codepoints; 0 means unlimited. Requires a value ≥ 0. Setter reapplies current text, can truncate its tail and resets caret/selection; does not emit TextChanged.
MiddleMousePasteEnabledProperty
public bool MiddleMousePasteEnabled { get; set; }Allows middle-button primary-selection paste on supported platforms, default true. Separate from regular clipboard paste; false does not block programmatic insertion.
PlaceholderTextProperty
public string PlaceholderText { get; set; }Separate hint for an empty field, initially empty. Not part of Text or the entered value; display uses its translated form.
RightIconProperty
public Texture2D RightIcon { get; set; }Shared right-side Texture2D, default null. Placement mirrors for RTL. Built-in clear button takes priority while visible. Assigned-texture changes refresh minimum size; the resource is not copied.
RightIconScaleProperty
public float RightIconScale { get; set; }Icon-size multiplier only for IconExpandMode = FitToLineEdit, default 1. Other modes ignore it. Setter does not clamp the range: use a positive finite value, typically 0.1–1.
SecretProperty
public bool Secret { get; set; }Masks display, default false. Text and GetSelectedText retain original characters; this is not encryption or secure password storage.
SecretCharacterProperty
public string SecretCharacter { get; set; }Mask character, default •. Supply one Unicode codepoint: longer strings warn and are truncated. An empty value draws the default • without clearing Text.
SelectAllOnFocusProperty
public bool SelectAllOnFocus { get; set; }Select all text when editing starts, default false. With the left mouse button held, selection waits until release. Does not override SelectingEnabled = false.
SelectingEnabledProperty
public bool SelectingEnabled { get; set; }Allows selection, default true. Disabling clears selection; Select and SelectAll do nothing while false.
ShortcutKeysEnabledProperty
public bool ShortcutKeysEnabled { get; set; }Allows built-in editing shortcuts, default true. Does not disable normal typing and every navigation action, direct MenuOption or programmatic Text writes.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }BiDi parsing rule for structured text, default Default. Uri/File/Email/List preserve meaningful parts of mixed-direction strings; Custom uses the Control callback. Does not change original Text.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Shared Array of BiDi-parser options. Getter and setter share the container; mutating an alias does not trigger shaping. Copy before editing and assign through the setter to refresh.
TextProperty
public string Text { get; set; }Raw field value, initially empty. Setter replaces text subject to MaxLength, clears selection/previous history and resets caret/scroll to the start. Does not emit TextChanged; overflow can emit TextChangeRejected.
TextDirectionProperty
public Control.TextDirection TextDirection { get; set; }Text shaping direction, default Auto. Inherited uses layout direction; Ltr/Rtl explicitly set direction. Does not reverse stored text or replace LayoutDirection.
VirtualKeyboardEnabledProperty
public bool VirtualKeyboardEnabled { get; set; }Allows virtual-keyboard requests on supported platforms, default true. Does not create an on-screen keyboard or disable hardware input when false.
VirtualKeyboardShowOnFocusProperty
public bool VirtualKeyboardShowOnFocus { get; set; }Request the virtual keyboard on focus, default true. Requires VirtualKeyboardEnabled and platform support. Explicit Edit can request it even when false.
VirtualKeyboardTypeProperty
public LineEdit.VirtualKeyboardTypeEnum VirtualKeyboardType { get; set; }Keyboard-type hint to the platform, default Default. Number/EmailAddress and other values do not filter Text or replace input validation.
Methods98
ApplyImevoid
public void ApplyIme();Commits current composition through InsertTextAtCaret and closes the IME window. Respects MaxLength but does not itself emit TextChanged or replace selection as an input operation would. Without composition, only closes the IME window where supported.
CancelImevoid
public void CancelIme();Discards unfinished IME composition and closes the IME window without inserting it into Text. Does not remove already committed text and is not Undo.
Clearvoid
public void Clear();Clears text, selection and history, resets caret/scroll. Emits TextChanged immediately only when previous text was nonempty. Also works with Editable = false.
DeleteCharAtCaretvoid
public void DeleteCharAtCaret();Deletes before the caret and emits TextChanged immediately. Defaults to one codepoint; with BackspaceDeletesCompositeCharacterEnabled = true and CaretMidGrapheme = false deletes the previous composite character. Does nothing at the start or in an empty field. This is not selection deletion.
DeleteTextvoid
public void DeleteText(int fromColumn, int toColumn);Deletes [fromColumn, toColumn) in codepoints; requires 0 ≤ fromColumn ≤ toColumn ≤ length. Text/caret change immediately; TextChanged is scheduled deferred in the tree, coalescing deletions before delivery. Does not automatically clear selection; manage it separately.
| Name | Type | Default |
|---|---|---|
fromColumn | int | — |
toColumn | int | — |
fromColumnHalf-open range start in Unicode codepoints; DeleteText requires a valid index.
toColumnExclusive end in codepoints. Only Select accepts a negative value to mean end of text.
Deselectvoid
public void Deselect();Clears selection and resets its bounds without changing text or caret position.
Edit2 overloads
public void Edit();Starts editing in the tree, requesting focus first if needed. Requires Editable. hideFocus hides the requested focus indication rather than input itself. With existing focus, direct Edit changes state without EditingToggled; acquiring focus can emit through FocusEnter. Explicit Edit requests the virtual keyboard independently of VirtualKeyboardShowOnFocus, subject to VirtualKeyboardEnabled and platform support.
public void Edit(bool hideFocus = false);Starts editing in the tree, requesting focus first if needed. Requires Editable. hideFocus hides the requested focus indication rather than input itself. With existing focus, direct Edit changes state without EditingToggled; acquiring focus can emit through FocusEnter. Explicit Edit requests the virtual keyboard independently of VirtualKeyboardShowOnFocus, subject to VirtualKeyboardEnabled and platform support.
| Name | Type | Default |
|---|---|---|
hideFocus | bool | false |
hideFocusHide focus indication when acquiring focus through Edit.
GetCaretBlinkIntervalfloat
public float GetCaretBlinkInterval();Caret visibility-toggle interval in seconds, default 0.65. Supply a positive finite value; nonpositive values are rejected. Takes effect with CaretBlink = true.
floatVisibility-toggle interval in seconds.
GetCaretColumnint
public int GetCaretColumn();Caret position in Unicode codepoints rather than UTF-16 index; default 0. Setter clamps to 0…text length and adjusts scrolling to show the caret when in the tree.
intCurrent codepoint caret column.
GetDrawControlCharsbool
public bool GetDrawControlChars();Visualize control characters during shaping, default false. Does not add control characters to Text or change validation rules.
boolControl-character visualization flag.
GetHorizontalAlignmentHorizontalAlignment
public HorizontalAlignment GetHorizontalAlignment();Horizontal alignment, default Left. Left/Right account for layout direction; Fill justifies through shaping rather than wrapping. Does not set CaretColumn.
HorizontalAlignmentCurrent HorizontalAlignment.
GetIconExpandModeLineEdit.ExpandMode
public LineEdit.ExpandMode GetIconExpandMode();Sizing for RightIcon and clear icon: OriginalSize uses source dimensions; FitToText uses a square at font height; FitToLineEdit fits field height with a width bound and applies RightIconScale. Default OriginalSize. FitToText does not preserve a nonsquare image’s aspect ratio.
LineEdit.ExpandModeCurrent LineEdit.ExpandMode.
GetLanguagestring
public string GetLanguage();Shaping language; default empty uses the control locale. Does not translate Text or switch application locale; supply a language code for correct script shaping.
stringShaping language, or empty for the control locale.
GetMaxLengthint
public int GetMaxLength();Maximum Unicode codepoints; 0 means unlimited. Requires a value ≥ 0. Setter reapplies current text, can truncate its tail and resets caret/selection; does not emit TextChanged.
intCodepoint limit; 0 means unlimited.
GetMenuPopupMenu
public PopupMenu GetMenu();Lazily creates and returns the internal PopupMenu owned by LineEdit. Do not free or remove it. Works with ContextMenuEnabled = false and does not open it. Built-in items are refreshed before display; preserve their IDs and avoid replacing built-in command handling.
PopupMenuShared internal PopupMenu owned by the field.
GetNextCompositeCharacterColumnint
public int GetNextCompositeCharacterColumn(int column);Returns the position after a composite character according to shaping. Requires a codepoint column in 0…length; returns the same position at the end.
| Name | Type | Default |
|---|---|---|
column | int | — |
columnCurrent codepoint position: 0…Text length, not a UTF-16 index.
intNext composite-character boundary in codepoints; current position at the end.
GetPlaceholderstring
public string GetPlaceholder();Separate hint for an empty field, initially empty. Not part of Text or the entered value; display uses its translated form.
stringOriginal placeholder string rather than the entered value.
GetPreviousCompositeCharacterColumnint
public int GetPreviousCompositeCharacterColumn(int column);Returns the position before a composite character according to shaping. Requires a codepoint column in 0…length; returns 0 at the start.
| Name | Type | Default |
|---|---|---|
column | int | — |
columnCurrent codepoint position: 0…Text length, not a UTF-16 index.
intPrevious composite-character boundary in codepoints; 0 at the start.
GetRightIconTexture2D
public Texture2D GetRightIcon();Shared right-side Texture2D, default null. Placement mirrors for RTL. Built-in clear button takes priority while visible. Assigned-texture changes refresh minimum size; the resource is not copied.
Texture2DShared Texture2D, or null.
GetRightIconScalefloat
public float GetRightIconScale();Icon-size multiplier only for IconExpandMode = FitToLineEdit, default 1. Other modes ignore it. Setter does not clamp the range: use a positive finite value, typically 0.1–1.
floatStored FitToLineEdit sizing multiplier.
GetScrollOffsetfloat
public float GetScrollOffset();Returns horizontal text drawing translation in local pixels, normally ≤ 0. Not a character index or positive ScrollBar position; changes while keeping the caret visible.
floatText drawing translation in local pixels.
GetSecretCharacterstring
public string GetSecretCharacter();Mask character, default •. Supply one Unicode codepoint: longer strings warn and are truncated. An empty value draws the default • without clearing Text.
stringStored mask character, or an empty string.
GetSelectedTextstring
public string GetSelectedText();Returns selected original Text, including in Secret mode; returns an empty string without selection.
stringSelected original text, or an empty string.
GetSelectionFromColumnint
public int GetSelectionFromColumn();Returns selection start in codepoints. Check HasSelection first: without selection the method reports an error and returns -1.
intInclusive start column; -1 with an error when no selection exists.
GetSelectionToColumnint
public int GetSelectionToColumn();Returns the exclusive selection end in codepoints. Check HasSelection first: without selection it reports an error and returns -1.
intExclusive end column; -1 with an error when no selection exists.
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();BiDi parsing rule for structured text, default Default. Uri/File/Email/List preserve meaningful parts of mixed-direction strings; Custom uses the Control callback. Does not change original Text.
TextServer.StructuredTextParserSelected TextServer.StructuredTextParser.
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Shared Array of BiDi-parser options. Getter and setter share the container; mutating an alias does not trigger shaping. Copy before editing and assign through the setter to refresh.
Reckfell.Collections.ArrayOptions Array sharing its contents.
GetTextstring
public string GetText();Raw field value, initially empty. Setter replaces text subject to MaxLength, clears selection/previous history and resets caret/scroll to the start. Does not emit TextChanged; overflow can emit TextChangeRejected.
stringOriginal field text, without masking or placeholder.
GetTextDirectionControl.TextDirection
public Control.TextDirection GetTextDirection();Text shaping direction, default Auto. Inherited uses layout direction; Ltr/Rtl explicitly set direction. Does not reverse stored text or replace LayoutDirection.
Control.TextDirectionSelected Control.TextDirection.
GetVirtualKeyboardShowOnFocusbool
public bool GetVirtualKeyboardShowOnFocus();Request the virtual keyboard on focus, default true. Requires VirtualKeyboardEnabled and platform support. Explicit Edit can request it even when false.
boolRequest-keyboard-on-focus flag.
GetVirtualKeyboardTypeLineEdit.VirtualKeyboardTypeEnum
public LineEdit.VirtualKeyboardTypeEnum GetVirtualKeyboardType();Keyboard-type hint to the platform, default Default. Number/EmailAddress and other values do not filter Text or replace input validation.
LineEdit.VirtualKeyboardTypeEnumLineEdit.VirtualKeyboardTypeEnum hint.
HasImeTextbool
public bool HasImeText();Whether an unfinished IME composition exists. Displayed separately from committed Text; false does not mean the platform lacks IME support.
booltrue for unfinished composition.
HasRedobool
public bool HasRedo();Whether a next state is available after undo. A new edit can discard that branch; Editable = false separately blocks executing Redo.
booltrue when a next history state exists.
HasSelectionbool
public bool HasSelection();Checks for active selection. Use before reading selection endpoints.
booltrue when selection is active.
HasUndobool
public bool HasUndo();Whether a previous history state is available. Does not mean undo is permitted when Editable = false. Clear rebuilds history but the previous value can remain undoable; do not treat clearing as secure erasure.
booltrue when a previous history state exists.
InsertTextAtCaretvoid
public void InsertTextAtCaret(string text);Inserts text at the caret and advances past the accepted portion. Respects MaxLength and emits TextChangeRejected for the tail. Does not itself remove selection, check Editable or emit TextChanged.
| Name | Type | Default |
|---|---|---|
text | string | — |
textInserts text at the caret and advances past the accepted portion. Respects MaxLength and emits TextChangeRejected for the tail. Does not itself remove selection, check Editable or emit TextChanged.
IsBackspaceDeletesCompositeCharacterEnabledbool
public bool IsBackspaceDeletesCompositeCharacterEnabled();Delete a whole composite character before the caret when CaretMidGrapheme = false; default false removes one codepoint. Also affects DeleteCharAtCaret.
boolComposite-deletion flag used when CaretMidGrapheme = false.
IsCaretBlinkEnabledbool
public bool IsCaretBlinkEnabled();Caret blinking, default false. Enabling uses internal frame processing; visibility still depends on editing, focus or CaretForceDisplayed.
boolStored CaretBlink flag.
IsCaretForceDisplayedbool
public bool IsCaretForceDisplayed();Show the caret outside normal editing/focus conditions, default false. Does not start editing or enable Editable. Forced display does not apply to an element belonging to the edited scene.
boolStored CaretForceDisplayed flag.
IsCaretMidGraphemeEnabledbool
public bool IsCaretMidGraphemeEnabled();Allows caret movement within composite characters, default false. When true, DeleteCharAtCaret removes one codepoint even with composite deletion enabled. Direct CaretColumn assignment does not itself snap indices to grapheme boundaries.
boolWhether movement within composite characters is allowed.
IsClearButtonEnabledbool
public bool IsClearButtonEnabled();Built-in clear button, default false. Drawn for a nonempty editable field instead of RightIcon; its space contributes to minimum size even when empty. Clearing changes text rather than submitting it.
boolStored ClearButtonEnabled flag.
IsContextMenuEnabledbool
public bool IsContextMenuEnabled();Allows the standard context menu through user input, default true. false does not block GetMenu, direct MenuOption or code-driven text changes.
boolStored ContextMenuEnabled flag.
IsDeselectOnFocusLossEnabledbool
public bool IsDeselectOnFocusLossEnabled();Deselect on focus loss/end of editing, default true. Enabling also immediately deselects an already unfocused field. Drag operations have separate selection-retention conditions.
boolStored DeselectOnFocusLossEnabled flag.
IsDragAndDropSelectionEnabledbool
public bool IsDragAndDropSelectionEnabled();Allows dragging selected text, default true. Separate from SelectingEnabled; does not block programmatic Select or Text writes.
boolStored DragAndDropSelectionEnabled flag.
IsEditablebool
public bool IsEditable();Allows user editing, default true. false does not block programmatic text operations; disabling it during active editing ends editing.
boolUser-editing permission flag.
IsEditingbool
public bool IsEditing();Returns editing state, separate from Editable and HasFocus. A field can retain focus after Unedit while no longer editing.
boolCurrent editing state.
IsEditingKeptOnTextSubmitbool
public bool IsEditingKeptOnTextSubmit();Continue editing after ui_text_submit, default false. Does not suppress TextSubmitted or validate the value.
boolWhether editing continues after submission.
IsEmojiMenuEnabledbool
public bool IsEmojiMenuEnabled();Allows the system emoji/symbol picker item in the standard menu, default true. Requires platform support; false does not prohibit emoji input or programmatic insertion.
boolStored EmojiMenuEnabled flag.
IsExpandToTextLengthEnabledbool
public bool IsExpandToTextLengthEnabled();Raises minimum width to shaped-text width plus caret space, default false. Can expand the parent container; leave false for a bounded-width field.
boolStored ExpandToTextLength flag.
IsFlatbool
public bool IsFlat();Skip the normal/read_only background, default false. The separate focus style still draws; style margins and minimum size remain.
boolStored Flat flag.
IsMenuVisiblebool
public bool IsMenuVisible();Returns visibility of the created context menu; false before creation. Does not itself create the menu.
booltrue when the internal menu exists and is visible.
IsMiddleMousePasteEnabledbool
public bool IsMiddleMousePasteEnabled();Allows middle-button primary-selection paste on supported platforms, default true. Separate from regular clipboard paste; false does not block programmatic insertion.
boolStored MiddleMousePasteEnabled flag.
IsSecretbool
public bool IsSecret();Masks display, default false. Text and GetSelectedText retain original characters; this is not encryption or secure password storage.
boolDisplay-masking flag.
IsSelectAllOnFocusbool
public bool IsSelectAllOnFocus();Select all text when editing starts, default false. With the left mouse button held, selection waits until release. Does not override SelectingEnabled = false.
boolStored SelectAllOnFocus flag.
IsSelectingEnabledbool
public bool IsSelectingEnabled();Allows selection, default true. Disabling clears selection; Select and SelectAll do nothing while false.
boolSelection permission flag.
IsShortcutKeysEnabledbool
public bool IsShortcutKeysEnabled();Allows built-in editing shortcuts, default true. Does not disable normal typing and every navigation action, direct MenuOption or programmatic Text writes.
boolStored ShortcutKeysEnabled flag.
IsVirtualKeyboardEnabledbool
public bool IsVirtualKeyboardEnabled();Allows virtual-keyboard requests on supported platforms, default true. Does not create an on-screen keyboard or disable hardware input when false.
boolStored VirtualKeyboardEnabled flag.
MenuOptionvoid
public void MenuOption(int option);Executes a command by numeric LineEdit.MenuItems value rather than PopupMenu item index. ContextMenuEnabled does not block this call. Clear/Cut/Paste/Undo/Redo check Editable; SelectAll checks SelectingEnabled. Clipboard/emoji commands can access the OS. Handle custom items yourself rather than passing arbitrary values to MenuOption.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionNumeric built-in LineEdit.MenuItems value rather than a menu index.
Selectvoid
public void Select(int from = 0, int to = -1);Selects [from, to) in codepoints without moving the caret. from clamps to 0…length; negative or excessive to means end. (0, 0) deselects; normalized from ≥ to retains the previous selection. Does nothing when SelectingEnabled = false.
| Name | Type | Default |
|---|---|---|
from | int | 0 |
to | int | -1 |
fromHalf-open range start in Unicode codepoints; DeleteText requires a valid index.
toExclusive end in codepoints. Only Select accepts a negative value to mean end of text.
SelectAllvoid
public void SelectAll();Selects all nonempty text if SelectingEnabled is enabled. Does not move a nonempty field’s caret; positions it at 0 in an empty field.
SetBackspaceDeletesCompositeCharacterEnabledvoid
public void SetBackspaceDeletesCompositeCharacterEnabled(bool enable);Delete a whole composite character before the caret when CaretMidGrapheme = false; default false removes one codepoint. Also affects DeleteCharAtCaret.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableDelete a whole composite character before the caret when CaretMidGrapheme = false; default false removes one codepoint. Also affects DeleteCharAtCaret.
SetCaretBlinkEnabledvoid
public void SetCaretBlinkEnabled(bool enabled);Caret blinking, default false. Enabling uses internal frame processing; visibility still depends on editing, focus or CaretForceDisplayed.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledCaret blinking, default false. Enabling uses internal frame processing; visibility still depends on editing, focus or CaretForceDisplayed.
SetCaretBlinkIntervalvoid
public void SetCaretBlinkInterval(float interval);Caret visibility-toggle interval in seconds, default 0.65. Supply a positive finite value; nonpositive values are rejected. Takes effect with CaretBlink = true.
| Name | Type | Default |
|---|---|---|
interval | float | — |
intervalCaret visibility-toggle interval in seconds, default 0.65. Supply a positive finite value; nonpositive values are rejected. Takes effect with CaretBlink = true.
SetCaretColumnvoid
public void SetCaretColumn(int position);Caret position in Unicode codepoints rather than UTF-16 index; default 0. Setter clamps to 0…text length and adjusts scrolling to show the caret when in the tree.
| Name | Type | Default |
|---|---|---|
position | int | — |
positionCaret position in Unicode codepoints rather than UTF-16 index; default 0. Setter clamps to 0…text length and adjusts scrolling to show the caret when in the tree.
SetCaretForceDisplayedvoid
public void SetCaretForceDisplayed(bool enabled);Show the caret outside normal editing/focus conditions, default false. Does not start editing or enable Editable. Forced display does not apply to an element belonging to the edited scene.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledShow the caret outside normal editing/focus conditions, default false. Does not start editing or enable Editable. Forced display does not apply to an element belonging to the edited scene.
SetCaretMidGraphemeEnabledvoid
public void SetCaretMidGraphemeEnabled(bool enabled);Allows caret movement within composite characters, default false. When true, DeleteCharAtCaret removes one codepoint even with composite deletion enabled. Direct CaretColumn assignment does not itself snap indices to grapheme boundaries.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllows caret movement within composite characters, default false. When true, DeleteCharAtCaret removes one codepoint even with composite deletion enabled. Direct CaretColumn assignment does not itself snap indices to grapheme boundaries.
SetClearButtonEnabledvoid
public void SetClearButtonEnabled(bool enable);Built-in clear button, default false. Drawn for a nonempty editable field instead of RightIcon; its space contributes to minimum size even when empty. Clearing changes text rather than submitting it.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableBuilt-in clear button, default false. Drawn for a nonempty editable field instead of RightIcon; its space contributes to minimum size even when empty. Clearing changes text rather than submitting it.
SetContextMenuEnabledvoid
public void SetContextMenuEnabled(bool enable);Allows the standard context menu through user input, default true. false does not block GetMenu, direct MenuOption or code-driven text changes.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows the standard context menu through user input, default true. false does not block GetMenu, direct MenuOption or code-driven text changes.
SetDeselectOnFocusLossEnabledvoid
public void SetDeselectOnFocusLossEnabled(bool enable);Deselect on focus loss/end of editing, default true. Enabling also immediately deselects an already unfocused field. Drag operations have separate selection-retention conditions.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableDeselect on focus loss/end of editing, default true. Enabling also immediately deselects an already unfocused field. Drag operations have separate selection-retention conditions.
SetDragAndDropSelectionEnabledvoid
public void SetDragAndDropSelectionEnabled(bool enable);Allows dragging selected text, default true. Separate from SelectingEnabled; does not block programmatic Select or Text writes.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows dragging selected text, default true. Separate from SelectingEnabled; does not block programmatic Select or Text writes.
SetDrawControlCharsvoid
public void SetDrawControlChars(bool enable);Visualize control characters during shaping, default false. Does not add control characters to Text or change validation rules.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableVisualize control characters during shaping, default false. Does not add control characters to Text or change validation rules.
SetEditablevoid
public void SetEditable(bool enabled);Allows user editing, default true. false does not block programmatic text operations; disabling it during active editing ends editing.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledAllows user editing, default true. false does not block programmatic text operations; disabling it during active editing ends editing.
SetEmojiMenuEnabledvoid
public void SetEmojiMenuEnabled(bool enable);Allows the system emoji/symbol picker item in the standard menu, default true. Requires platform support; false does not prohibit emoji input or programmatic insertion.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows the system emoji/symbol picker item in the standard menu, default true. Requires platform support; false does not prohibit emoji input or programmatic insertion.
SetExpandToTextLengthEnabledvoid
public void SetExpandToTextLengthEnabled(bool enabled);Raises minimum width to shaped-text width plus caret space, default false. Can expand the parent container; leave false for a bounded-width field.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledRaises minimum width to shaped-text width plus caret space, default false. Can expand the parent container; leave false for a bounded-width field.
SetFlatvoid
public void SetFlat(bool enabled);Skip the normal/read_only background, default false. The separate focus style still draws; style margins and minimum size remain.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledSkip the normal/read_only background, default false. The separate focus style still draws; style margins and minimum size remain.
SetHorizontalAlignmentvoid
public void SetHorizontalAlignment(HorizontalAlignment alignment);Horizontal alignment, default Left. Left/Right account for layout direction; Fill justifies through shaping rather than wrapping. Does not set CaretColumn.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
alignmentHorizontal alignment, default Left. Left/Right account for layout direction; Fill justifies through shaping rather than wrapping. Does not set CaretColumn.
SetIconExpandModevoid
public void SetIconExpandMode(LineEdit.ExpandMode mode);Sizing for RightIcon and clear icon: OriginalSize uses source dimensions; FitToText uses a square at font height; FitToLineEdit fits field height with a width bound and applies RightIconScale. Default OriginalSize. FitToText does not preserve a nonsquare image’s aspect ratio.
| Name | Type | Default |
|---|---|---|
mode | LineEdit.ExpandMode | — |
modeSizing for RightIcon and clear icon: OriginalSize uses source dimensions; FitToText uses a square at font height; FitToLineEdit fits field height with a width bound and applies RightIconScale. Default OriginalSize. FitToText does not preserve a nonsquare image’s aspect ratio.
SetKeepEditingOnTextSubmitvoid
public void SetKeepEditingOnTextSubmit(bool enable);Continue editing after ui_text_submit, default false. Does not suppress TextSubmitted or validate the value.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableContinue editing after ui_text_submit, default false. Does not suppress TextSubmitted or validate the value.
SetLanguagevoid
public void SetLanguage(string language);Shaping language; default empty uses the control locale. Does not translate Text or switch application locale; supply a language code for correct script shaping.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageShaping language; default empty uses the control locale. Does not translate Text or switch application locale; supply a language code for correct script shaping.
SetMaxLengthvoid
public void SetMaxLength(int chars);Maximum Unicode codepoints; 0 means unlimited. Requires a value ≥ 0. Setter reapplies current text, can truncate its tail and resets caret/selection; does not emit TextChanged.
| Name | Type | Default |
|---|---|---|
chars | int | — |
charsMaximum Unicode codepoints; 0 means unlimited. Requires a value ≥ 0. Setter reapplies current text, can truncate its tail and resets caret/selection; does not emit TextChanged.
SetMiddleMousePasteEnabledvoid
public void SetMiddleMousePasteEnabled(bool enable);Allows middle-button primary-selection paste on supported platforms, default true. Separate from regular clipboard paste; false does not block programmatic insertion.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows middle-button primary-selection paste on supported platforms, default true. Separate from regular clipboard paste; false does not block programmatic insertion.
SetPlaceholdervoid
public void SetPlaceholder(string text);Separate hint for an empty field, initially empty. Not part of Text or the entered value; display uses its translated form.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSeparate hint for an empty field, initially empty. Not part of Text or the entered value; display uses its translated form.
SetRightIconvoid
public void SetRightIcon(Texture2D icon);Shared right-side Texture2D, default null. Placement mirrors for RTL. Built-in clear button takes priority while visible. Assigned-texture changes refresh minimum size; the resource is not copied.
| Name | Type | Default |
|---|---|---|
icon | Texture2D | — |
iconShared right-side Texture2D, default null. Placement mirrors for RTL. Built-in clear button takes priority while visible. Assigned-texture changes refresh minimum size; the resource is not copied.
SetRightIconScalevoid
public void SetRightIconScale(float scale);Icon-size multiplier only for IconExpandMode = FitToLineEdit, default 1. Other modes ignore it. Setter does not clamp the range: use a positive finite value, typically 0.1–1.
| Name | Type | Default |
|---|---|---|
scale | float | — |
scaleIcon-size multiplier only for IconExpandMode = FitToLineEdit, default 1. Other modes ignore it. Setter does not clamp the range: use a positive finite value, typically 0.1–1.
SetSecretvoid
public void SetSecret(bool enabled);Masks display, default false. Text and GetSelectedText retain original characters; this is not encryption or secure password storage.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledMasks display, default false. Text and GetSelectedText retain original characters; this is not encryption or secure password storage.
SetSecretCharactervoid
public void SetSecretCharacter(string character);Mask character, default •. Supply one Unicode codepoint: longer strings warn and are truncated. An empty value draws the default • without clearing Text.
| Name | Type | Default |
|---|---|---|
character | string | — |
characterMask character, default •. Supply one Unicode codepoint: longer strings warn and are truncated. An empty value draws the default • without clearing Text.
SetSelectAllOnFocusvoid
public void SetSelectAllOnFocus(bool enabled);Select all text when editing starts, default false. With the left mouse button held, selection waits until release. Does not override SelectingEnabled = false.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledSelect all text when editing starts, default false. With the left mouse button held, selection waits until release. Does not override SelectingEnabled = false.
SetSelectingEnabledvoid
public void SetSelectingEnabled(bool enable);Allows selection, default true. Disabling clears selection; Select and SelectAll do nothing while false.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows selection, default true. Disabling clears selection; Select and SelectAll do nothing while false.
SetShortcutKeysEnabledvoid
public void SetShortcutKeysEnabled(bool enable);Allows built-in editing shortcuts, default true. Does not disable normal typing and every navigation action, direct MenuOption or programmatic Text writes.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows built-in editing shortcuts, default true. Does not disable normal typing and every navigation action, direct MenuOption or programmatic Text writes.
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);BiDi parsing rule for structured text, default Default. Uri/File/Email/List preserve meaningful parts of mixed-direction strings; Custom uses the Control callback. Does not change original Text.
| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
parserBiDi parsing rule for structured text, default Default. Uri/File/Email/List preserve meaningful parts of mixed-direction strings; Custom uses the Control callback. Does not change original Text.
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);Shared Array of BiDi-parser options. Getter and setter share the container; mutating an alias does not trigger shaping. Copy before editing and assign through the setter to refresh.
| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
argsShared Array of BiDi-parser options. Getter and setter share the container; mutating an alias does not trigger shaping. Copy before editing and assign through the setter to refresh.
SetTextvoid
public void SetText(string text);Raw field value, initially empty. Setter replaces text subject to MaxLength, clears selection/previous history and resets caret/scroll to the start. Does not emit TextChanged; overflow can emit TextChangeRejected.
| Name | Type | Default |
|---|---|---|
text | string | — |
textRaw field value, initially empty. Setter replaces text subject to MaxLength, clears selection/previous history and resets caret/scroll to the start. Does not emit TextChanged; overflow can emit TextChangeRejected.
SetTextDirectionvoid
public void SetTextDirection(Control.TextDirection direction);Text shaping direction, default Auto. Inherited uses layout direction; Ltr/Rtl explicitly set direction. Does not reverse stored text or replace LayoutDirection.
| Name | Type | Default |
|---|---|---|
direction | Control.TextDirection | — |
directionText shaping direction, default Auto. Inherited uses layout direction; Ltr/Rtl explicitly set direction. Does not reverse stored text or replace LayoutDirection.
SetVirtualKeyboardEnabledvoid
public void SetVirtualKeyboardEnabled(bool enable);Allows virtual-keyboard requests on supported platforms, default true. Does not create an on-screen keyboard or disable hardware input when false.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableAllows virtual-keyboard requests on supported platforms, default true. Does not create an on-screen keyboard or disable hardware input when false.
SetVirtualKeyboardShowOnFocusvoid
public void SetVirtualKeyboardShowOnFocus(bool showOnFocus);Request the virtual keyboard on focus, default true. Requires VirtualKeyboardEnabled and platform support. Explicit Edit can request it even when false.
| Name | Type | Default |
|---|---|---|
showOnFocus | bool | — |
showOnFocusRequest the virtual keyboard on focus, default true. Requires VirtualKeyboardEnabled and platform support. Explicit Edit can request it even when false.
SetVirtualKeyboardTypevoid
public void SetVirtualKeyboardType(LineEdit.VirtualKeyboardTypeEnum type);Keyboard-type hint to the platform, default Default. Number/EmailAddress and other values do not filter Text or replace input validation.
| Name | Type | Default |
|---|---|---|
type | LineEdit.VirtualKeyboardTypeEnum | — |
typeKeyboard-type hint to the platform, default Default. Number/EmailAddress and other values do not filter Text or replace input validation.
Uneditvoid
public void Unedit();Ends active editing, applies current IME composition and hides the virtual keyboard where applicable. Does not release focus or itself emit EditingToggled. Deselection depends on DeselectOnFocusLossEnabled and drag state.
Signals and events4
EditingToggledEvent
public event LineEdit.EditingToggledEventHandler EditingToggled;Notification from focus paths, user actions and Editable changes. Not universal observation of IsEditing: direct Edit/Unedit with existing focus may not emit it. Read IsEditing in the handler for current state.
| Name | Type | Default |
|---|---|---|
toggledOn | bool | — |
toggledOnState reported by this notification path; read IsEditing for actual state.
TextChangeRejectedEvent
public event LineEdit.TextChangeRejectedEventHandler TextChangeRejected;Part of an insertion exceeded MaxLength. Supplies the discarded tail while the available prefix is accepted. Can occur during SetText or MaxLength assignment even without TextChanged.
| Name | Type | Default |
|---|---|---|
rejectedSubstring | string | — |
rejectedSubstringInsertion tail exceeding the codepoint limit.
TextChangedEvent
public event LineEdit.TextChangedEventHandler TextChanged;Text-change notification from user editing and some programmatic operations. Text/SetText and InsertTextAtCaret do not themselves emit it; Clear and DeleteCharAtCaret emit immediately, DeleteText deferred in the tree. Do not treat it as universal observation of every Text write.
| Name | Type | Default |
|---|---|---|
newText | string | — |
newTextOriginal field text at notification time, without masking or placeholder.
TextSubmittedEvent
public event LineEdit.TextSubmittedEventHandler TextSubmitted;Submission through ui_text_submit, usually Enter. Supplies current original text; assigning Text does not emit it. Validate under application rules before saving.
| Name | Type | Default |
|---|---|---|
newText | string | — |
newTextOriginal field text at notification time, without masking or placeholder.
LineEdit.ExpandMode
| Value | Description |
|---|---|
FitToLineEdit = 2 | Scale the right icon to fit the LineEdit. |
FitToText = 1 | Scale the right icon's size to match the size of the text. |
OriginalSize = 0 | Use the original size for the right icon. |
LineEdit.MenuItems
| Value | Description |
|---|---|
Clear = 3 | Erases the whole |
Copy = 1 | Copies the selected text. |
Cut = 0 | Cuts (copies and clears) the selected text. |
DirAuto = 9 | Sets text direction to automatic. |
DirInherited = 8 | Sets text direction to inherited. |
DirLtr = 10 | Sets text direction to left-to-right. |
DirRtl = 11 | Sets text direction to right-to-left. |
DisplayUcc = 12 | Toggles control character display. |
EmojiAndSymbol = 30 | Opens system emoji and symbol picker. |
InsertAlm = 21 | Inserts Arabic letter mark (ALM) character. |
InsertFsi = 24 | Inserts first strong isolate (FSI) character. |
InsertLre = 16 | Inserts start of left-to-right embedding (LRE) character. |
InsertLri = 22 | Inserts left-to-right isolate (LRI) character. |
InsertLrm = 14 | Inserts left-to-right mark (LRM) character. |
InsertLro = 18 | Inserts start of left-to-right override (LRO) character. |
InsertPdf = 20 | Inserts pop direction formatting (PDF) character. |
InsertPdi = 25 | Inserts pop direction isolate (PDI) character. |
InsertRle = 17 | Inserts start of right-to-left embedding (RLE) character. |
InsertRli = 23 | Inserts right-to-left isolate (RLI) character. |
InsertRlm = 15 | Inserts right-to-left mark (RLM) character. |
InsertRlo = 19 | Inserts start of right-to-left override (RLO) character. |
InsertShy = 29 | Inserts soft hyphen (SHY) character. |
InsertWj = 28 | Inserts word joiner (WJ) character. |
InsertZwj = 26 | Inserts zero width joiner (ZWJ) character. |
InsertZwnj = 27 | Inserts zero width non-joiner (ZWNJ) character. |
Max = 31 | Represents the size of the |
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 |
Redo = 6 | Reverse the last undo action. |
SelectAll = 4 | Selects the whole |
SubmenuInsertUcc = 13 | ID of "Insert Control Character" submenu. |
SubmenuTextDir = 7 | ID of "Text Writing Direction" submenu. |
Undo = 5 | Undoes the previous action. |
LineEdit.VirtualKeyboardTypeEnum
| Value | Description |
|---|---|
Default = 0 | Default text virtual keyboard. |
EmailAddress = 5 | Virtual keyboard with additional keys to assist with typing email addresses. |
Multiline = 1 | Multiline virtual keyboard. |
Number = 2 | Virtual number keypad, useful for PIN entry. |
NumberDecimal = 3 | Virtual number keypad, useful for entering fractional numbers. |
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 |
Phone = 4 | Virtual phone number keypad. |
Url = 7 | Virtual keyboard with additional keys to assist with typing URLs. |
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
caret_colorColor | Color of the Color(0.95, 0.95, 0.95, 1) |
clear_button_colorColor | Color used as default tint for the clear button. Default:Color(0.875, 0.875, 0.875, 1) |
clear_button_color_pressedColor | Color used for the clear button when it's pressed. Default:Color(1, 1, 1, 1) |
font_colorColor | Default font color. Default:Color(0.875, 0.875, 0.875, 1) |
font_outline_colorColor | The tint of text outline of the Color(0, 0, 0, 1) |
font_placeholder_colorColor | Font color for Color(0.875, 0.875, 0.875, 0.6) |
font_selected_colorColor | Font color for selected text (inside the selection rectangle). Default:Color(1, 1, 1, 1) |
font_uneditable_colorColor | Font color when editing is disabled. Default:Color(0.875, 0.875, 0.875, 0.5) |
selection_colorColor | Color of the selection rectangle. Default:Color(0.5, 0.5, 0.5, 1) |
caret_widthint | 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. Default:1 |
minimum_character_widthint | Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'W' characters (i.e. this number of 'W' characters can be displayed without scrolling). Default:4 |
outline_sizeint | The size of the text outline.
Note: If using a font with 0 |
fontFont | Font used for the text. |
font_sizeint | Font size of the |
clearTexture2D | Texture for the clear button. See |
caret_move_rejected_soundAudioStream | Played when the caret is attempted to be moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], or [kbd]Page Down[/kbd], but the caret doesn't actually move since it's already at the beginning/end of the text. |
caret_moved_soundAudioStream | Played when the caret is moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], [kbd]Page Down[/kbd], or mouse clicks. |
focus_soundAudioStream | Played when this |
text_change_rejected_soundAudioStream | Played when a text change is rejected (for instance, when pressing Backspace while there is no text or when |
text_changed_soundAudioStream | Played when text is successfully changed through keyboard input (physical or virtual). |
text_submitted_soundAudioStream | Played when text is submitted using the |
focusStyleBox | Background used when |
normalStyleBox | Default background for the |
read_onlyStyleBox | Background used when |