API ReferenceSandbox.UI

TextEntryclass

A `Sandbox.UI.Panel` that the user can enter text into.

objectBaseControlTextEntry
Namespace
Sandbox.UI
Assembly
Base Library
Declaration
public class Sandbox.UI.TextEntry : Sandbox.UI.BaseControl

Constructors2

Showing 2 constructors

Methods63

Showing 63 methods

public void ClearUndoHistory()PUBLIC

Throw the history away - for when the text is replaced by something the user didn't do.

Returns:void

protected virtual void OnDrop(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnTripleClick(Sandbox.UI.MousePanelEvent e)PROTECTEDVIRTUAL

A third click takes the whole line - which is everything, when there's only one line.

ParameterTypeDescription
eMousePanelEvent
Returns:void

public void Redo()PUBLIC

Put back whatever the last undo took away.

Returns:void

public void Undo()PUBLIC

Put back the text, caret and selection from before the last edit.

Returns:void

Properties69

Showing 69 properties

protected bool Sandbox.UI.TextEntry.CanEdit { get; set; }PROTECTEDGETSET

Whether the text can be changed at all right now.

Returns:bool

public bool Sandbox.UI.TextEntry.CanRedo { get; set; }PUBLICGETSET

Is there anything to redo?

Returns:bool

public bool Sandbox.UI.TextEntry.CanUndo { get; set; }PUBLICGETSET

Is there anything to undo?

Returns:bool

public bool Sandbox.UI.TextEntry.ReadOnly { get; set; }PUBLICGETSET

The text can be selected and copied, but not changed. Unlike `Sandbox.UI.TextEntry.Disabled` this still takes focus, so it reads and behaves like text rather than like a dead control.

Returns:bool

public bool Sandbox.UI.TextEntry.WholeNumbers { get; set; }PUBLICGETSET

With `Sandbox.UI.TextEntry.Numeric`, only allow whole numbers - no decimal point.

Returns:bool

On this page

Constructorspublic TextEntry()public TextEntry()Methodspublic System.Void AddToHistory(System.String str)public System.Void AddToHistory(System.String str)protected virtual System.Void AutoCompleteCancel()protected virtual System.Void AutoCompleteCancel()protected virtual System.Void AutoCompleteSelectionChanged()protected virtual System.Void AutoCompleteSelectionChanged()public virtual System.Boolean CanEnterCharacter(System.Char c)public virtual System.Boolean CanEnterCharacter(System.Char c)public System.Void ClearHistory()public System.Void ClearHistory()public System.Void ClearUndoHistory()public virtual System.Void DestroyAutoComplete()public virtual System.Void DestroyAutoComplete()public virtual System.String FixNumeric()public virtual System.String FixNumeric()public virtual System.String GetClipboardValue(System.Boolean cut)public virtual System.String GetClipboardValue(System.Boolean cut)protected virtual System.Boolean IsPanelEmpty()protected virtual System.Boolean IsPanelEmpty()protected virtual System.Void OnBlur(Sandbox.UI.PanelEvent e)protected virtual System.Void OnBlur(Sandbox.UI.PanelEvent e)public virtual System.Void OnButtonEvent(Sandbox.UI.ButtonEvent e)public virtual System.Void OnButtonEvent(Sandbox.UI.ButtonEvent e)public virtual System.Void OnButtonTyped(Sandbox.UI.ButtonEvent e)public virtual System.Void OnButtonTyped(Sandbox.UI.ButtonEvent e)protected virtual System.Void OnDoubleClick(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnDoubleClick(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnDragSelect(Sandbox.UI.SelectionEvent e)protected virtual System.Void OnDragSelect(Sandbox.UI.SelectionEvent e)public virtual System.Void OnDraw()public virtual System.Void OnDraw()protected virtual System.Void OnDrop(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEscape(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEscape(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEvent(Sandbox.UI.PanelEvent e)protected virtual System.Void OnEvent(Sandbox.UI.PanelEvent e)protected virtual System.Void OnFocus(Sandbox.UI.PanelEvent e)protected virtual System.Void OnFocus(Sandbox.UI.PanelEvent e)public virtual System.Void OnKeyTyped(System.Char k)public virtual System.Void OnKeyTyped(System.Char k)protected virtual System.Void OnMouseDown(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseDown(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseMove(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseMove(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseUp(Sandbox.UI.MousePanelEvent e)protected virtual System.Void OnMouseUp(Sandbox.UI.MousePanelEvent e)public virtual System.Void OnPaste(System.String text)public virtual System.Void OnPaste(System.String text)protected virtual System.Void OnTripleClick(Sandbox.UI.MousePanelEvent e)public virtual System.Void OnValueChanged()public virtual System.Void OnValueChanged()public System.Void Redo()public virtual System.Void SetProperty(System.String name, System.String value)public virtual System.Void SetProperty(System.String name, System.String value)public virtual System.Void Tick()public virtual System.Void Tick()public System.Void Undo()public System.Void UpdateAutoComplete()public System.Void UpdateAutoComplete()public System.Void UpdateAutoComplete(System.Object[] options)public System.Void UpdateAutoComplete(System.Object[] options)public System.Void UpdateValidation()public System.Void UpdateValidation()Propertiespublic virtual System.Boolean Sandbox.UI.TextEntry.AcceptsImeInput { get; set; }public virtual System.Boolean Sandbox.UI.TextEntry.AcceptsImeInput { get; set; }public System.Boolean Sandbox.UI.TextEntry.AllowEmojiReplace { get; set; }public System.Boolean Sandbox.UI.TextEntry.AllowEmojiReplace { get; set; }public System.Func`2<System.String,System.Object[]> Sandbox.UI.TextEntry.AutoComplete { get; set; }public System.Func`2<System.String,System.Object[]> Sandbox.UI.TextEntry.AutoComplete { get; set; }protected System.Boolean Sandbox.UI.TextEntry.CanEdit { get; set; }public System.Boolean Sandbox.UI.TextEntry.CanRedo { get; set; }public System.Boolean Sandbox.UI.TextEntry.CanUndo { get; set; }public System.Int32 Sandbox.UI.TextEntry.CaretPosition { get; set; }public System.Int32 Sandbox.UI.TextEntry.CaretPosition { get; set; }public System.String Sandbox.UI.TextEntry.CharacterRegex { get; set; }public System.String Sandbox.UI.TextEntry.CharacterRegex { get; set; }public System.Boolean Sandbox.UI.TextEntry.Disabled { get; set; }public System.Boolean Sandbox.UI.TextEntry.Disabled { get; set; }public System.Boolean Sandbox.UI.TextEntry.HasClearButton { get; set; }public System.Boolean Sandbox.UI.TextEntry.HasClearButton { get; set; }public System.Boolean Sandbox.UI.TextEntry.HasValidationErrors { get; set; }public System.Boolean Sandbox.UI.TextEntry.HasValidationErrors { get; set; }public System.String Sandbox.UI.TextEntry.HistoryCookie { get; set; }public System.String Sandbox.UI.TextEntry.HistoryCookie { get; set; }public System.Int32 Sandbox.UI.TextEntry.HistoryMaxItems { get; set; }public System.Int32 Sandbox.UI.TextEntry.HistoryMaxItems { get; set; }public System.String Sandbox.UI.TextEntry.Icon { get; set; }public System.String Sandbox.UI.TextEntry.Icon { get; set; }public Sandbox.UI.IconPanel Sandbox.UI.TextEntry.IconPanel { get; set; }public Sandbox.UI.IconPanel Sandbox.UI.TextEntry.IconPanel { get; set; }protected Sandbox.UI.Label Sandbox.UI.TextEntry.Label { get; set; }protected Sandbox.UI.Label Sandbox.UI.TextEntry.Label { get; set; }public System.Nullable`1<System.Int32> Sandbox.UI.TextEntry.MaxLength { get; set; }public System.Nullable`1<System.Int32> Sandbox.UI.TextEntry.MaxLength { get; set; }public System.Nullable`1<System.Single> Sandbox.UI.TextEntry.MaxValue { get; set; }public System.Nullable`1<System.Single> Sandbox.UI.TextEntry.MaxValue { get; set; }public System.Nullable`1<System.Int32> Sandbox.UI.TextEntry.MinLength { get; set; }public System.Nullable`1<System.Int32> Sandbox.UI.TextEntry.MinLength { get; set; }public System.Nullable`1<System.Single> Sandbox.UI.TextEntry.MinValue { get; set; }public System.Nullable`1<System.Single> Sandbox.UI.TextEntry.MinValue { get; set; }public System.Boolean Sandbox.UI.TextEntry.Multiline { get; set; }public System.Boolean Sandbox.UI.TextEntry.Multiline { get; set; }public System.String Sandbox.UI.TextEntry.NumberFormat { get; set; }public System.String Sandbox.UI.TextEntry.NumberFormat { get; set; }public System.Boolean Sandbox.UI.TextEntry.Numeric { get; set; }public System.Boolean Sandbox.UI.TextEntry.Numeric { get; set; }public System.Action`1<System.String> Sandbox.UI.TextEntry.OnTextEdited { get; set; }public System.Action`1<System.String> Sandbox.UI.TextEntry.OnTextEdited { get; set; }public System.String Sandbox.UI.TextEntry.Placeholder { get; set; }public System.String Sandbox.UI.TextEntry.Placeholder { get; set; }public System.String Sandbox.UI.TextEntry.Prefix { get; set; }public System.String Sandbox.UI.TextEntry.Prefix { get; set; }public Sandbox.UI.Label Sandbox.UI.TextEntry.PrefixLabel { get; set; }public Sandbox.UI.Label Sandbox.UI.TextEntry.PrefixLabel { get; set; }public System.Boolean Sandbox.UI.TextEntry.ReadOnly { get; set; }public Color Sandbox.UI.TextEntry.SelectionColor { get; set; }public Color Sandbox.UI.TextEntry.SelectionColor { get; set; }public System.String Sandbox.UI.TextEntry.StringRegex { get; set; }public System.String Sandbox.UI.TextEntry.StringRegex { get; set; }public System.String Sandbox.UI.TextEntry.Suffix { get; set; }public System.String Sandbox.UI.TextEntry.Suffix { get; set; }public Sandbox.UI.Label Sandbox.UI.TextEntry.SuffixLabel { get; set; }public Sandbox.UI.Label Sandbox.UI.TextEntry.SuffixLabel { get; set; }public virtual System.Boolean Sandbox.UI.TextEntry.SupportsMultiEdit { get; set; }public virtual System.Boolean Sandbox.UI.TextEntry.SupportsMultiEdit { get; set; }public System.String Sandbox.UI.TextEntry.Text { get; set; }public System.String Sandbox.UI.TextEntry.Text { get; set; }public System.Int32 Sandbox.UI.TextEntry.TextLength { get; set; }public System.Int32 Sandbox.UI.TextEntry.TextLength { get; set; }public System.String Sandbox.UI.TextEntry.Value { get; set; }public System.String Sandbox.UI.TextEntry.Value { get; set; }public System.Boolean Sandbox.UI.TextEntry.WholeNumbers { get; set; }Metadata