LineEdit
An input field where users can enter and edit a single line of text. It’s commonly used for gathering textual information from users, such as usernames, passwords, search queries, or any other type of short text input.
local input = LineEdit(text: optional)
Properties
- setOnTextChange(callback)
The function executed text inside changes
- setOnReturnPress(callback)
The function executed when
Enter
key has been pressed
- setOnTextSelection(callback)
The function executed when text inside the widget get’s selected
- Params:
self
andtext
- setInputMode(callback)
Sets how text input is handled. Available options
normal
,hideinput
,passwordonedit
andpassword
- setText(text)
Sets text in the widget
- getText()
Returns the text input
- setHint(text)
Sets hint/placeholder text in the widget
- getSelectedText()
Returns selected text
- checkTextSelected()
Returns if widget has any text selected
- setReadOnly(enable: bool)
Sets widget to read-only or allow input
- redo()
Redo text input
- undo()
Undo text input
- setMaxLength()
Sets the maximum input length in the widget
- selectAll()
Selects all text
- getStartSelection()
Returns the start cursor position for selected text
- getEndSelection()
Returns the end cursor position for selected text
- getSelectionLength()
Returns count for text selected