Class ComboBox
ComboBox control
Implements
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class ComboBox : View, IEnumerable
Constructors
ComboBox(Int32, Int32, Int32, Int32, IList<String>)
Public constructor
Declaration
public ComboBox(int x, int y, int w, int h, IList<string> source)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The x coordinate |
System.Int32 | y | The y coordinate |
System.Int32 | w | The width |
System.Int32 | h | The height |
System.Collections.Generic.IList<System.String> | source | Auto completion source |
Properties
Text
The currently selected list item
Declaration
public ustring Text { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring |
Methods
OnEnter()
Method invoked when a view gets focus.
Declaration
public override bool OnEnter()
Returns
Type | Description |
---|---|
System.Boolean | true , if the event was handled, false otherwise. |
Overrides
ProcessKey(KeyEvent)
If the view is focused, gives the view a
chance to process the keystroke.
Declaration
public override bool ProcessKey(KeyEvent e)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | e |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process.
The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses.
Events
Changed
Changed event, raised when the selection has been confirmed.
Declaration
public event EventHandler<ustring> Changed
Event Type
Type | Description |
---|---|
System.EventHandler<NStack.ustring> |
Remarks
Client code can hook up to this event, it is
raised when the selection has been confirmed.
Implements
System.Collections.IEnumerable