class
LineEdit
public class LineEdit : Widget A single line text entry. See TextEdit for multi line version.
Constructors
Properties
| Name | Type | Description |
|---|---|---|
HistoryCookie | String | |
ForwardNavigationEvents | Widget | Forward up, down and enter keys to this control. This is useful if you have a search box that you want to also allow to navigate a list of items. |
Value virtual | String | Alias of Text, except disallows setting text when IsFocused is . |
Text | String | The text of this text entry. |
DisplayText | String | |
PlaceholderText | String | The placeholder text, it will be displayed only when the text entry is empty. Typically used to as a short description of the expected input, or as an example input. |
MaxLength | Int32 | User entered text can never be longer than this many characters (not bytes). |
HasSelectedText | Boolean | Whether the user has any text selected within this text entry. |
SelectionStart | Int32 | Character at which the text selection begins, or -1 if there is no selection. |
SelectionEnd | Int32 | Character at which the text selection ends, or -1 if there is no selection. |
ClearButtonEnabled | Boolean | Show a button to clear the text input when it is not empty. |
ReadOnly virtual | Boolean | |
SelectedText | String | The selected text, if any. |
CursorPosition | Int32 | Position of the text cursor, at which newly typed letters will be inserted. |
AutoComplete | AutoComplete | |
AutoCompleteVisible | Boolean | Whether the auto completeMenu is visible or not. |
Alignment | TextFlag | |
RegexValidator | String | |
CursorRect | Rect | |
HistoryVisible | Boolean | True if history menu is visible |
MaxHistoryItems | Int32 | if set > 1 we will support history items (which you need to add using AddHistory) |
Methods
virtual Void RestoreHistoryFromCookie() virtual Void SaveHistoryCookie() Void Clear() Clear the text.
Void SelectAll() Select all of the text.
Void SetSelection(Int32 start, Int32 length) Set the selected text region.
Void Deselect() De-select all of the text.
Void Undo() Void Redo() Void Cut() Void Copy() Void Paste() Void Insert(String val) Void SetValidator(String str) Void SetAutoComplete(Action<Menu, String> func) Void AddHistory(String text)