LineEdit

package
v0.0.0-...-357ca8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

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, see also KeepEditingOnTextSubmit.

- To exit edit mode, press ui_text_submit or ui_cancel (by default Escape) actions.

- Check Edit, Unedit, IsEditing, and OnEditingToggled for more information.

While entering text, it is possible to insert special characters using Unicode, OEM or Windows alt codes:

- To enter Unicode codepoints, hold Alt and type the codepoint on the numpad. For example, to enter the character á (U+00E1), hold Alt and type +E1 on the numpad (the leading zeroes can be omitted).

- To enter OEM codepoints, hold Alt and type the code on the numpad. For example, to enter the character á (OEM 160), hold Alt and type 160 on the numpad.

- To enter Windows codepoints, hold Alt and type the code on the numpad. For example, to enter the character á (Windows 0225), hold Alt and type 0, 2, 2, 5 on the numpad. The leading zero here must not be omitted, as this is how Windows codepoints are distinguished from OEM codepoints.

Important:

- Focusing the LineEdit with ui_focus_next (by default Tab) or ui_focus_prev (by default Shift + Tab) or Control.GrabFocus still enters edit mode (for compatibility).

LineEdit features many built-in shortcuts that are always available (Ctrl here maps to Cmd on macOS):

- Ctrl + C: Copy

- Ctrl + X: Cut

- Ctrl + V or Ctrl + Y: Paste/"yank"

- Ctrl + Z: Undo

- Ctrl + ~: Swap input direction.

- Ctrl + Shift + Z: Redo

- Ctrl + U: Delete text from the caret position to the beginning of the line

- Ctrl + K: Delete text from the caret position to the end of the line

- Ctrl + A: Select all text

- Up Arrow/Down Arrow: Move the caret to the beginning/end of the line

On macOS, some extra keyboard shortcuts are available:

- Cmd + F: Same as Right Arrow, move the caret one character right

- Cmd + B: Same as Left Arrow, move the caret one character left

- Cmd + P: Same as Up Arrow, move the caret to the previous line

- Cmd + N: Same as Down Arrow, move the caret to the next line

- Cmd + D: Same as Delete, delete the character on the right side of caret

- Cmd + H: Same as Backspace, delete the character on the left side of the caret

- Cmd + A: Same as Home, move the caret to the beginning of the line

- Cmd + E: Same as End, move the caret to the end of the line

- Cmd + Left Arrow: Same as Home, move the caret to the beginning of the line

- Cmd + Right Arrow: Same as End, move the caret to the end of the line

Note: Caret movement shortcuts listed above are not affected by ShortcutKeysEnabled.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsLineEdit() Instance
}

type Expanded

type Expanded = MoreArgs

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsCanvasItem

func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance

func (*Extension[T]) AsControl

func (self *Extension[T]) AsControl() Control.Instance

func (*Extension[T]) AsLineEdit

func (self *Extension[T]) AsLineEdit() Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.LineEdit

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) Alignment

func (self Instance) Alignment() GUI.HorizontalAlignment

Text alignment as defined in the [HorizontalAlignment] enum.

func (Instance) ApplyIme

func (self Instance) ApplyIme()

Applies text from the Input Method Editor (IME) and closes the IME if it is open.

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsLineEdit

func (self Instance) AsLineEdit() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) BackspaceDeletesCompositeCharacterEnabled

func (self Instance) BackspaceDeletesCompositeCharacterEnabled() bool

If true and CaretMidGrapheme is false, backspace deletes an entire composite character such as ❤️‍🩹, instead of deleting part of the composite character.

func (Instance) CancelIme

func (self Instance) CancelIme()

Closes the Input Method Editor (IME) if it is open. Any text in the IME will be lost.

func (self Instance) CaretBlink() bool

If true, makes the caret blink.

func (Instance) CaretBlinkInterval

func (self Instance) CaretBlinkInterval() Float.X

The interval at which the caret blinks (in seconds).

func (Instance) CaretColumn

func (self Instance) CaretColumn() int

The caret's column position inside the LineEdit. When set, the text may scroll to accommodate it.

func (Instance) CaretForceDisplayed

func (self Instance) CaretForceDisplayed() bool

If true, the LineEdit will always show the caret, even if not editing or focus is lost.

func (Instance) CaretMidGrapheme

func (self Instance) CaretMidGrapheme() bool

Allow moving caret, selecting and removing the individual composite character components.

Note: Backspace is always removing individual composite character components.

func (Instance) Clear

func (self Instance) Clear()

Erases the LineEdit's Text.

func (Instance) ClearButtonEnabled

func (self Instance) ClearButtonEnabled() bool

If true, the LineEdit will show a clear button if Text is not empty, which can be used to clear the text quickly.

func (Instance) ContextMenuEnabled

func (self Instance) ContextMenuEnabled() bool

If true, the context menu will appear when right-clicked.

func (Instance) DeleteCharAtCaret

func (self Instance) DeleteCharAtCaret()

Deletes one character at the caret's current position (equivalent to pressing Delete).

func (Instance) DeleteText

func (self Instance) DeleteText(from_column int, to_column int)

Deletes a section of the Text going from position 'from_column' to 'to_column'. Both parameters should be within the text's length.

func (Instance) Deselect

func (self Instance) Deselect()

Clears the current selection.

func (Instance) DeselectOnFocusLossEnabled

func (self Instance) DeselectOnFocusLossEnabled() bool

If true, the selected text will be deselected when focus is lost.

func (Instance) DragAndDropSelectionEnabled

func (self Instance) DragAndDropSelectionEnabled() bool

If true, allow drag and drop of selected text.

func (Instance) DrawControlChars

func (self Instance) DrawControlChars() bool

If true, control characters are displayed.

func (Instance) Edit

func (self Instance) Edit()

Allows entering edit mode whether the LineEdit is focused or not.

See also KeepEditingOnTextSubmit.

func (Instance) Editable

func (self Instance) Editable() bool

If false, existing text cannot be modified and new text cannot be added.

func (Instance) EmojiMenuEnabled

func (self Instance) EmojiMenuEnabled() bool

If true, "Emoji and Symbols" menu is enabled.

func (Instance) ExpandToTextLength

func (self Instance) ExpandToTextLength() bool

If true, the LineEdit width will increase to stay longer than the Text. It will not compress if the Text is shortened.

func (Instance) Flat

func (self Instance) Flat() bool

If true, the LineEdit doesn't display decoration.

func (Instance) GetMenu

func (self Instance) GetMenu() PopupMenu.Instance

Returns the 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 MenuItems). For example:

Ready := func() {
	var menu = line_edit.GetMenu()
	// Remove all items after "Redo".
	menu.SetItemCount(menu.GetItemIndex(int(LineEdit.MenuRedo)) + 1)
	// Add custom items.
	menu.AddSeparator()
	menu.MoreArgs().AddItem("Insert Date", int(LineEdit.MenuMax)+1, 0)
	// Connect callback.
	menu.OnIdPressed(func(id int) {
		if id == int(LineEdit.MenuMax)+1 {
			line_edit.InsertTextAtCaret(Time.GetDateStringFromSystem(false))
		}
	})
}

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 Window.Visible property.

func (Instance) GetNextCompositeCharacterColumn

func (self Instance) GetNextCompositeCharacterColumn(column int) int

Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters.

Note: To check at caret location use get_next_composite_character_column(get_caret_column())

func (Instance) GetPreviousCompositeCharacterColumn

func (self Instance) GetPreviousCompositeCharacterColumn(column int) int

Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters.

Note: To check at caret location use get_previous_composite_character_column(get_caret_column())

func (Instance) GetScrollOffset

func (self Instance) GetScrollOffset() Float.X

Returns the scroll offset due to CaretColumn, as a number of characters.

func (Instance) GetSelectedText

func (self Instance) GetSelectedText() string

Returns the text inside the selection.

func (Instance) GetSelectionFromColumn

func (self Instance) GetSelectionFromColumn() int

Returns the selection begin column.

func (Instance) GetSelectionToColumn

func (self Instance) GetSelectionToColumn() int

Returns the selection end column.

func (Instance) HasImeText

func (self Instance) HasImeText() bool

Returns true if the user has text in the Input Method Editor (IME).

func (Instance) HasRedo

func (self Instance) HasRedo() bool

Returns true if a "redo" action is available.

func (Instance) HasSelection

func (self Instance) HasSelection() bool

Returns true if the user has selected text.

func (Instance) HasUndo

func (self Instance) HasUndo() bool

Returns true if an "undo" action is available.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) InsertTextAtCaret

func (self Instance) InsertTextAtCaret(text string)

Inserts 'text' at the caret. If the resulting value is longer than MaxLength, nothing happens.

func (Instance) IsEditing

func (self Instance) IsEditing() bool

Returns whether the LineEdit is being edited.

func (Instance) IsMenuVisible

func (self Instance) IsMenuVisible() bool

Returns whether the menu is visible. Use this instead of get_menu().visible to improve performance (so the creation of the menu is avoided).

func (Instance) KeepEditingOnTextSubmit

func (self Instance) KeepEditingOnTextSubmit() bool

If true, the LineEdit will not exit edit mode when text is submitted by pressing ui_text_submit action (by default: Enter or Kp Enter).

func (Instance) Language

func (self Instance) Language() string

Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead.

func (Instance) MaxLength

func (self Instance) MaxLength() int

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 MaxLength are truncated. This happens both for existing Text contents when setting the max length, or for new text inserted in the LineEdit, including pasting.

If any input text is truncated, the OnTextChangeRejected signal is emitted with the truncated substring as a parameter:

func (Instance) MenuOption

func (self Instance) MenuOption(option int)

Executes a given action as defined in the MenuItems enum.

func (Instance) MiddleMousePasteEnabled

func (self Instance) MiddleMousePasteEnabled() bool

If false, using middle mouse button to paste clipboard will be disabled.

Note: This method is only implemented on Linux.

func (Instance) MoreArgs

func (self Instance) MoreArgs() MoreArgs

MoreArgs enables certain functions to be called with additional 'optional' arguments.

func (Instance) OnEditingToggled

func (self Instance) OnEditingToggled(cb func(toggled_on bool), flags ...Signal.Flags)

Emitted when the LineEdit switches in or out of edit mode.

func (Instance) OnTextChangeRejected

func (self Instance) OnTextChangeRejected(cb func(rejected_substring string), flags ...Signal.Flags)

Emitted when appending text that overflows the MaxLength. The appended text is truncated to fit MaxLength, and the part that couldn't fit is passed as the 'rejected_substring' argument.

func (Instance) OnTextChanged

func (self Instance) OnTextChanged(cb func(new_text string), flags ...Signal.Flags)

Emitted when the text changes.

func (Instance) OnTextSubmitted

func (self Instance) OnTextSubmitted(cb func(new_text string), flags ...Signal.Flags)

Emitted when the user presses the ui_text_submit action (by default: Enter or Kp Enter) while the LineEdit has focus.

func (Instance) PlaceholderText

func (self Instance) PlaceholderText() string

Text shown when the LineEdit is empty. It is not the LineEdit's default value (see Text).

func (Instance) RightIcon

func (self Instance) RightIcon() Texture2D.Instance

Sets the icon that will appear in the right end of the LineEdit if there's no Text, or always, if ClearButtonEnabled is set to false.

func (Instance) Secret

func (self Instance) Secret() bool

If true, every character is replaced with the secret character (see SecretCharacter).

func (Instance) SecretCharacter

func (self Instance) SecretCharacter() string

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.

func (Instance) Select

func (self Instance) Select()

Selects characters inside LineEdit between 'from' and 'to'. By default, 'from' is at the beginning and 'to' at the end.

line_edit.SetText("Welcome")
line_edit.Select()                 // Will select "Welcome".
line_edit.MoreArgs().Select(4, -1) // Will select "ome".
line_edit.MoreArgs().Select(2, 5)  // Will select "lco".

func (Instance) SelectAll

func (self Instance) SelectAll()

Selects the whole string.

func (Instance) SelectAllOnFocus

func (self Instance) SelectAllOnFocus() bool

If true, the LineEdit will select the whole text when it gains focus.

func (Instance) SelectingEnabled

func (self Instance) SelectingEnabled() bool

If false, it's impossible to select the text using mouse nor keyboard.

func (Instance) SetAlignment

func (self Instance) SetAlignment(value GUI.HorizontalAlignment)

SetAlignment sets the property returned by [GetHorizontalAlignment].

func (Instance) SetBackspaceDeletesCompositeCharacterEnabled

func (self Instance) SetBackspaceDeletesCompositeCharacterEnabled(value bool)

SetBackspaceDeletesCompositeCharacterEnabled sets the property returned by [IsBackspaceDeletesCompositeCharacterEnabled].

func (self Instance) SetCaretBlink(value bool)

SetCaretBlink sets the property returned by [IsCaretBlinkEnabled].

func (Instance) SetCaretBlinkInterval

func (self Instance) SetCaretBlinkInterval(value Float.X)

SetCaretBlinkInterval sets the property returned by [GetCaretBlinkInterval].

func (Instance) SetCaretColumn

func (self Instance) SetCaretColumn(value int)

SetCaretColumn sets the property returned by [GetCaretColumn].

func (Instance) SetCaretForceDisplayed

func (self Instance) SetCaretForceDisplayed(value bool)

SetCaretForceDisplayed sets the property returned by [IsCaretForceDisplayed].

func (Instance) SetCaretMidGrapheme

func (self Instance) SetCaretMidGrapheme(value bool)

SetCaretMidGrapheme sets the property returned by [IsCaretMidGraphemeEnabled].

func (Instance) SetClearButtonEnabled

func (self Instance) SetClearButtonEnabled(value bool)

SetClearButtonEnabled sets the property returned by [IsClearButtonEnabled].

func (Instance) SetContextMenuEnabled

func (self Instance) SetContextMenuEnabled(value bool)

SetContextMenuEnabled sets the property returned by [IsContextMenuEnabled].

func (Instance) SetDeselectOnFocusLossEnabled

func (self Instance) SetDeselectOnFocusLossEnabled(value bool)

SetDeselectOnFocusLossEnabled sets the property returned by [IsDeselectOnFocusLossEnabled].

func (Instance) SetDragAndDropSelectionEnabled

func (self Instance) SetDragAndDropSelectionEnabled(value bool)

SetDragAndDropSelectionEnabled sets the property returned by [IsDragAndDropSelectionEnabled].

func (Instance) SetDrawControlChars

func (self Instance) SetDrawControlChars(value bool)

SetDrawControlChars sets the property returned by [GetDrawControlChars].

func (Instance) SetEditable

func (self Instance) SetEditable(value bool)

SetEditable sets the property returned by [IsEditable].

func (Instance) SetEmojiMenuEnabled

func (self Instance) SetEmojiMenuEnabled(value bool)

SetEmojiMenuEnabled sets the property returned by [IsEmojiMenuEnabled].

func (Instance) SetExpandToTextLength

func (self Instance) SetExpandToTextLength(value bool)

SetExpandToTextLength sets the property returned by [IsExpandToTextLengthEnabled].

func (Instance) SetFlat

func (self Instance) SetFlat(value bool)

SetFlat sets the property returned by [IsFlat].

func (Instance) SetKeepEditingOnTextSubmit

func (self Instance) SetKeepEditingOnTextSubmit(value bool)

SetKeepEditingOnTextSubmit sets the property returned by [IsEditingKeptOnTextSubmit].

func (Instance) SetLanguage

func (self Instance) SetLanguage(value string)

SetLanguage sets the property returned by [GetLanguage].

func (Instance) SetMaxLength

func (self Instance) SetMaxLength(value int)

SetMaxLength sets the property returned by [GetMaxLength].

func (Instance) SetMiddleMousePasteEnabled

func (self Instance) SetMiddleMousePasteEnabled(value bool)

SetMiddleMousePasteEnabled sets the property returned by [IsMiddleMousePasteEnabled].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetPlaceholderText

func (self Instance) SetPlaceholderText(value string)

SetPlaceholderText sets the property returned by [GetPlaceholder].

func (Instance) SetRightIcon

func (self Instance) SetRightIcon(value Texture2D.Instance)

SetRightIcon sets the property returned by [GetRightIcon].

func (Instance) SetSecret

func (self Instance) SetSecret(value bool)

SetSecret sets the property returned by [IsSecret].

func (Instance) SetSecretCharacter

func (self Instance) SetSecretCharacter(value string)

SetSecretCharacter sets the property returned by [GetSecretCharacter].

func (Instance) SetSelectAllOnFocus

func (self Instance) SetSelectAllOnFocus(value bool)

SetSelectAllOnFocus sets the property returned by [IsSelectAllOnFocus].

func (Instance) SetSelectingEnabled

func (self Instance) SetSelectingEnabled(value bool)

SetSelectingEnabled sets the property returned by [IsSelectingEnabled].

func (Instance) SetShortcutKeysEnabled

func (self Instance) SetShortcutKeysEnabled(value bool)

SetShortcutKeysEnabled sets the property returned by [IsShortcutKeysEnabled].

func (Instance) SetStructuredTextBidiOverride

func (self Instance) SetStructuredTextBidiOverride(value TextServer.StructuredTextParser)

SetStructuredTextBidiOverride sets the property returned by [GetStructuredTextBidiOverride].

func (Instance) SetStructuredTextBidiOverrideOptions

func (self Instance) SetStructuredTextBidiOverrideOptions(value []any)

SetStructuredTextBidiOverrideOptions sets the property returned by [GetStructuredTextBidiOverrideOptions].

func (Instance) SetText

func (self Instance) SetText(value string)

SetText sets the property returned by [GetText].

func (Instance) SetTextDirection

func (self Instance) SetTextDirection(value Control.TextDirection)

SetTextDirection sets the property returned by [GetTextDirection].

func (Instance) SetVirtualKeyboardEnabled

func (self Instance) SetVirtualKeyboardEnabled(value bool)

SetVirtualKeyboardEnabled sets the property returned by [IsVirtualKeyboardEnabled].

func (Instance) SetVirtualKeyboardShowOnFocus

func (self Instance) SetVirtualKeyboardShowOnFocus(value bool)

SetVirtualKeyboardShowOnFocus sets the property returned by [GetVirtualKeyboardShowOnFocus].

func (Instance) SetVirtualKeyboardType

func (self Instance) SetVirtualKeyboardType(value VirtualKeyboardType)

SetVirtualKeyboardType sets the property returned by [GetVirtualKeyboardType].

func (Instance) ShortcutKeysEnabled

func (self Instance) ShortcutKeysEnabled() bool

If true, shortcut keys for context menu items are enabled, even if the context menu is disabled.

func (Instance) StructuredTextBidiOverride

func (self Instance) StructuredTextBidiOverride() TextServer.StructuredTextParser

Set BiDi algorithm override for the structured text.

func (Instance) StructuredTextBidiOverrideOptions

func (self Instance) StructuredTextBidiOverrideOptions() []any

Set additional options for BiDi override.

func (Instance) Text

func (self Instance) Text() string

String value of the LineEdit.

Note: Changing text using this property won't emit the OnTextChanged signal.

func (Instance) TextDirection

func (self Instance) TextDirection() Control.TextDirection

Base text writing direction.

func (Instance) Unedit

func (self Instance) Unedit()

Allows exiting edit mode while preserving focus.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) VirtualKeyboardEnabled

func (self Instance) VirtualKeyboardEnabled() bool

If true, the native virtual keyboard is enabled on platforms that support it.

func (Instance) VirtualKeyboardShowOnFocus

func (self Instance) VirtualKeyboardShowOnFocus() bool

If true, the native virtual keyboard is shown on focus events on platforms that support it.

func (Instance) VirtualKeyboardType

func (self Instance) VirtualKeyboardType() VirtualKeyboardType

Specifies the type of virtual keyboard to show.

type MenuItems int //gd:LineEdit.MenuItems
const (
	// Cuts (copies and clears) the selected text.
	MenuCut MenuItems = 0
	// Copies the selected text.
	MenuCopy MenuItems = 1
	// 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 [String.StripEscapes].
	//
	// [String.StripEscapes]: https://pkg.go.dev/graphics.gd/classdb/String#Instance.StripEscapes
	MenuPaste MenuItems = 2
	// Erases the whole [LineEdit] text.
	//
	// [LineEdit]: https://pkg.go.dev/graphics.gd/classdb/LineEdit
	MenuClear MenuItems = 3
	// Selects the whole [LineEdit] text.
	//
	// [LineEdit]: https://pkg.go.dev/graphics.gd/classdb/LineEdit
	MenuSelectAll MenuItems = 4
	// Undoes the previous action.
	MenuUndo MenuItems = 5
	// Reverse the last undo action.
	MenuRedo MenuItems = 6
	// ID of "Text Writing Direction" submenu.
	MenuSubmenuTextDir MenuItems = 7
	// Sets text direction to inherited.
	MenuDirInherited MenuItems = 8
	// Sets text direction to automatic.
	MenuDirAuto MenuItems = 9
	// Sets text direction to left-to-right.
	MenuDirLtr MenuItems = 10
	// Sets text direction to right-to-left.
	MenuDirRtl MenuItems = 11
	// Toggles control character display.
	MenuDisplayUcc MenuItems = 12
	// ID of "Insert Control Character" submenu.
	MenuSubmenuInsertUcc MenuItems = 13
	// Inserts left-to-right mark (LRM) character.
	MenuInsertLrm MenuItems = 14
	// Inserts right-to-left mark (RLM) character.
	MenuInsertRlm MenuItems = 15
	// Inserts start of left-to-right embedding (LRE) character.
	MenuInsertLre MenuItems = 16
	// Inserts start of right-to-left embedding (RLE) character.
	MenuInsertRle MenuItems = 17
	// Inserts start of left-to-right override (LRO) character.
	MenuInsertLro MenuItems = 18
	// Inserts start of right-to-left override (RLO) character.
	MenuInsertRlo MenuItems = 19
	// Inserts pop direction formatting (PDF) character.
	MenuInsertPdf MenuItems = 20
	// Inserts Arabic letter mark (ALM) character.
	MenuInsertAlm MenuItems = 21
	// Inserts left-to-right isolate (LRI) character.
	MenuInsertLri MenuItems = 22
	// Inserts right-to-left isolate (RLI) character.
	MenuInsertRli MenuItems = 23
	// Inserts first strong isolate (FSI) character.
	MenuInsertFsi MenuItems = 24
	// Inserts pop direction isolate (PDI) character.
	MenuInsertPdi MenuItems = 25
	// Inserts zero width joiner (ZWJ) character.
	MenuInsertZwj MenuItems = 26
	// Inserts zero width non-joiner (ZWNJ) character.
	MenuInsertZwnj MenuItems = 27
	// Inserts word joiner (WJ) character.
	MenuInsertWj MenuItems = 28
	// Inserts soft hyphen (SHY) character.
	MenuInsertShy MenuItems = 29
	// Opens system emoji and symbol picker.
	MenuEmojiAndSymbol MenuItems = 30
	// Represents the size of the [MenuItems] enum.
	MenuMax MenuItems = 31
)

type MoreArgs

type MoreArgs [1]gdclass.LineEdit

MoreArgs is a container for Instance functions with additional 'optional' arguments.

func (MoreArgs) Select

func (self MoreArgs) Select(from int, to int)

Selects characters inside LineEdit between 'from' and 'to'. By default, 'from' is at the beginning and 'to' at the end.

line_edit.SetText("Welcome")
line_edit.Select()                 // Will select "Welcome".
line_edit.MoreArgs().Select(4, -1) // Will select "ome".
line_edit.MoreArgs().Select(2, 5)  // Will select "lco".

type VirtualKeyboardType

type VirtualKeyboardType int //gd:LineEdit.VirtualKeyboardType
const (
	// Default text virtual keyboard.
	KeyboardTypeDefault VirtualKeyboardType = 0
	// Multiline virtual keyboard.
	KeyboardTypeMultiline VirtualKeyboardType = 1
	// Virtual number keypad, useful for PIN entry.
	KeyboardTypeNumber VirtualKeyboardType = 2
	// Virtual number keypad, useful for entering fractional numbers.
	KeyboardTypeNumberDecimal VirtualKeyboardType = 3
	// Virtual phone number keypad.
	KeyboardTypePhone VirtualKeyboardType = 4
	// Virtual keyboard with additional keys to assist with typing email addresses.
	KeyboardTypeEmailAddress VirtualKeyboardType = 5
	// 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 [KeyboardTypeDefault].
	KeyboardTypePassword VirtualKeyboardType = 6
	// Virtual keyboard with additional keys to assist with typing URLs.
	KeyboardTypeUrl VirtualKeyboardType = 7
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL