public class LineEdit extends Widget
Single-line editable text widget with cursor navigation, text selection, clipboard copy/cut/paste, and mouse drag selection support.
edit = LineEdit("initial text")
edit.selectAll()
copied = edit.copySelection()| Modifier and Type | Member | Description |
|---|---|---|
| public property | bgNormalbgNormal as String = "\u001b[48;2;44;44;48m" |
No summary. |
| public property | bgSelectionbgSelection as String = "\u001b[48;2;0;120;215m" |
No summary. |
| public property | cursorPositioncursorPosition as Long = 0 |
No summary. |
| public property | fgNormalfgNormal as String = "\u001b[38;2;245;245;245m" |
No summary. |
| public property | fgSelectionfgSelection as String = "\u001b[38;2;255;255;255m" |
No summary. |
| public override readonly property | focusablefocusable as Boolean |
No summary. |
| public override property | focusedfocused as Boolean |
No summary. |
| public property | placeholderplaceholder as String = "" |
No summary. |
| public property | placeholderFgplaceholderFg as String = "\u001b[38;2;120;130;140m" |
No summary. |
| public property | selectionAnchorselectionAnchor as Long = -1 |
No summary. |
| public property | selectionCaretselectionCaret as Long = -1 |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | clearSelectionclearSelection() as Void |
Clears any active selection. |
| public | copySelectioncopySelection() as Boolean |
Copies the active selection to the clipboard. |
| public | cursorDisplayColumncursorDisplayColumn() as Int |
No summary. |
| public | cutSelectioncutSelection() as Boolean |
Cuts the active selection to the clipboard and removes it from text. |
| public override | handleEvent | No summary. |
| public override | handleMouseEvent | No summary. |
| public | hasSelectionhasSelection() as Boolean |
Indicates whether a non-empty text selection is active. |
| public override | paintToFrame | No summary. |
| public | pasteText | Pastes text at the current cursor or replacing the selection. |
| public | selectAllselectAll() as Void |
Selects all text in the widget. |
| public | selectRange | Selects a given range of text. |
| public | selectedTextselectedText() as String |
Returns the currently selected substring. |
| public | selectionEndselectionEnd() as Long |
End index of the selection range, exclusive. |
| public | selectionStartselectionStart() as Long |
Start index of the selection range, inclusive. |