ComboBoxclass

objectWidgetComboBox
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.ComboBox : Editor.Widget

Constructors1

Showing 1 constructors

public ComboBox(Editor.Widget parent = null)PUBLICCONSTRUCTOR

ParameterTypeDescription
parent = nullWidget

Methods13

Showing 13 methods

public void AddItem(string text, string icon = null, System.Action onSelected = null, string description = null, bool selected = False, bool enabled = True)PUBLIC

ParameterTypeDescription
textstring
icon = nullstring
onSelected = nullAction
description = nullstring
selected = Falsebool
enabled = Truebool
Returns:void

public void Clear()PUBLIC

Returns:void

public void ClearText()PUBLIC

Returns:void

public System.Nullable`1<int> FindIndex(string text)PUBLIC

ParameterTypeDescription
textstring
Returns:Nullable<int>

public void InvokeSelected()PUBLIC

Returns:void

protected virtual void OnItemChanged()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnKeyPress(Editor.KeyEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eKeyEvent
Returns:void

protected virtual void OnTextChanged()PROTECTEDVIRTUAL

Returns:void

public virtual void RestoreFromStateCookie()PUBLICVIRTUAL

Returns:void

public virtual void SaveToStateCookie()PUBLICVIRTUAL

Returns:void

public void SetAutoComplete(System.Action`2<Editor.Menu,string> func)PUBLIC

ParameterTypeDescription
funcAction<Menu,string>
Returns:void

public bool TrySelectNamed(string name)PUBLIC

ParameterTypeDescription
namestring
Returns:bool

Properties11

Showing 11 properties

public bool Editor.ComboBox.AllowDuplicates { get; set; }PUBLICGETSET

Returns:bool

public int Editor.ComboBox.Count { get; set; }PUBLICGETSET

Returns:int

public int Editor.ComboBox.CurrentIndex { get; set; }PUBLICGETSET

Returns:int

public string Editor.ComboBox.CurrentText { get; set; }PUBLICGETSET

Returns:string

public bool Editor.ComboBox.Editable { get; set; }PUBLICGETSET

Returns:bool

public int Editor.ComboBox.MaxVisibleItems { get; set; }PUBLICGETSET

Returns:int

public System.Action Editor.ComboBox.OnReturn { get; set; }PUBLICGETSET

Returns:Action

public string Editor.ComboBox.StateCookie { get; set; }PUBLICGETSET

Returns:string

On this page

Constructorspublic ComboBox(Editor.Widget parent = null)Methodspublic System.Void AddItem(System.String text, System.String icon = null, System.Action onSelected = null, System.String description = null, System.Boolean selected = False, System.Boolean enabled = True)public System.Void Clear()public System.Void ClearText()public System.Nullable`1<System.Int32> FindIndex(System.String text)public System.Void InvokeSelected()protected virtual System.Void OnBlur(Editor.FocusChangeReason reason)protected virtual System.Void OnItemChanged()protected virtual System.Void OnKeyPress(Editor.KeyEvent e)protected virtual System.Void OnTextChanged()public virtual System.Void RestoreFromStateCookie()public virtual System.Void SaveToStateCookie()public System.Void SetAutoComplete(System.Action`2<Editor.Menu,System.String> func)public System.Boolean TrySelectNamed(System.String name)Propertiespublic System.Boolean Editor.ComboBox.AllowDuplicates { get; set; }public Editor.AutoComplete Editor.ComboBox.AutoComplete { get; set; }public System.Int32 Editor.ComboBox.Count { get; set; }public System.Int32 Editor.ComboBox.CurrentIndex { get; set; }public System.String Editor.ComboBox.CurrentText { get; set; }public System.Boolean Editor.ComboBox.Editable { get; set; }public Editor.ComboBox.InsertMode Editor.ComboBox.Insertion { get; set; }public Editor.LineEdit Editor.ComboBox.LineEdit { get; set; }public System.Int32 Editor.ComboBox.MaxVisibleItems { get; set; }public System.Action Editor.ComboBox.OnReturn { get; set; }public System.String Editor.ComboBox.StateCookie { get; set; }Metadata