public class Editor.LineEdit : Editor.Widget
A single line text entry. See `Editor.TextEdit` for multi line version.
Constructors
Showing 2 constructors
No results match this filter.
Methods
Showing 26 methods
public void AddHistory(string text)
public void Clear()
Clear the text.
public void Copy()
public void Cut()
public void Deselect()
De-select all of the text.
protected virtual bool FocusNext()
If we have our menus open, let use tab/shift tab to navigate instead of switching to next control
protected virtual bool FocusPrevious()
If we have our menus open, let use tab/shift tab to navigate instead of switching to next control
public void Insert(string val)
protected virtual void OnBlur(Editor.FocusChangeReason reason)
protected virtual void OnEditingFinished()
The text entry lost keyboard focus.
protected virtual void OnFocus(Editor.FocusChangeReason reason)
protected virtual void OnKeyPress(Editor.KeyEvent e)
protected virtual void OnReturnPressed()
Called when the user presses the return (Enter) key.
protected virtual void OnTextChanged(string value)
Called when the input text changes.
protected virtual void OnTextEdited(string value)
Called when the text was edited.
public void Paste()
public void Redo()
public virtual void RestoreHistoryFromCookie()
public virtual void SaveHistoryCookie()
public void SelectAll()
Select all of the text.
public void SetAutoComplete(System.Action`2<Editor.Menu,string> func)
public void SetSelection(int start, int length)
Set the selected text region.
public void SetValidator(string str)
public void Undo()
No results match this filter.
Properties
Showing 21 properties
public Editor.AutoComplete Editor.LineEdit.AutoComplete { get; set; }
public bool Editor.LineEdit.AutoCompleteVisible { get; set; }
Whether the auto complete`Editor.Menu` is visible or not.
public bool Editor.LineEdit.ClearButtonEnabled { get; set; }
Show a button to clear the text input when it is not empty.
public int Editor.LineEdit.CursorPosition { get; set; }
Position of the text cursor, at which newly typed letters will be inserted.
public string Editor.LineEdit.DisplayText { get; set; }
public Editor.Widget Editor.LineEdit.ForwardNavigationEvents { get; set; }
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.
public bool Editor.LineEdit.HasSelectedText { get; set; }
Whether the user has any text selected within this text entry.
public string Editor.LineEdit.HistoryCookie { get; set; }
public bool Editor.LineEdit.HistoryVisible { get; set; }
True if history menu is visible
public int Editor.LineEdit.MaxHistoryItems { get; set; }
if set > 1 we will support history items (which you need to add using AddHistory)
public int Editor.LineEdit.MaxLength { get; set; }
User entered text can never be longer than this many characters (not bytes).
public string Editor.LineEdit.PlaceholderText { get; set; }
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.
public virtual bool Editor.LineEdit.ReadOnly { get; set; }
public string Editor.LineEdit.RegexValidator { get; set; }
public string Editor.LineEdit.SelectedText { get; set; }
The selected text, if any.
public int Editor.LineEdit.SelectionEnd { get; set; }
Character at which the text selection ends, or -1 if there is no selection.
public int Editor.LineEdit.SelectionStart { get; set; }
Character at which the text selection begins, or -1 if there is no selection.
public string Editor.LineEdit.Text { get; set; }
The text of this text entry.
public virtual string Editor.LineEdit.Value { get; set; }
Alias of `Editor.LineEdit.Text`, except disallows setting text when `Editor.Widget.IsFocused` is .
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.LineEdit |