Search Results for

    Show / Hide Table of Contents

    Class ComboBox

    Provides a drop-down list of items the user can select from.
    Inheritance
    System.Object
    Responder
    View
    ComboBox
    Implements
    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    Inherited Members
    View.Added
    View.Removed
    View.Enter
    View.Leave
    View.MouseEnter
    View.MouseLeave
    View.MouseClick
    View.CanFocusChanged
    View.EnabledChanged
    View.VisibleChanged
    View.HotKeyChanged
    View.HotKey
    View.HotKeySpecifier
    View.Shortcut
    View.ShortcutTag
    View.ShortcutAction
    View.Data
    View.Driver
    View.Subviews
    View.TabIndexes
    View.TabIndex
    View.TabStop
    View.CanFocus
    View.Id
    View.IsCurrentTop
    View.WantMousePositionReports
    View.WantContinuousButtonPressed
    View.Frame
    View.LayoutStyle
    View.Bounds
    View.X
    View.Y
    View.Width
    View.Height
    View.ForceValidatePosDim
    View.GetMinWidthHeight(Size)
    View.SetMinWidthHeight()
    View.TextFormatter
    View.SuperView
    View.UpdateTextFormatterText()
    View.ProcessResizeView()
    View.SetNeedsDisplay()
    View.ClearLayoutNeeded()
    View.SetNeedsDisplay(Rect)
    View.SetChildNeedsDisplay()
    View.Add(View)
    View.Add(View[])
    View.RemoveAll()
    View.Remove(View)
    View.BringSubviewToFront(View)
    View.SendSubviewToBack(View)
    View.SendSubviewBackwards(View)
    View.BringSubviewForward(View)
    View.Clear()
    View.Clear(Rect)
    View.ScreenToView(Int32, Int32)
    View.ClipToBounds()
    View.SetClip(Rect)
    View.DrawFrame(Rect, Int32, Boolean)
    View.DrawHotString(ustring, Attribute, Attribute)
    View.DrawHotString(ustring, Boolean, ColorScheme)
    View.Move(Int32, Int32, Boolean)
    View.PositionCursor()
    View.HasFocus
    View.OnAdded(View)
    View.OnRemoved(View)
    View.Focused
    View.MostFocused
    View.AddRune(Int32, Int32, Rune)
    View.ClearNeedsDisplay()
    View.DrawContent
    View.OnDrawContent(Rect)
    View.DrawContentComplete
    View.OnDrawContentComplete(Rect)
    View.SetFocus()
    View.KeyPress
    View.InvokeKeybindings(KeyEvent)
    View.AddKeyBinding(Key, Command[])
    View.ReplaceKeyBinding(Key, Key)
    View.ContainsKeyBinding(Key)
    View.ClearKeybindings()
    View.ClearKeybinding(Key)
    View.ClearKeybinding(Command[])
    View.AddCommand(Command, Func<Nullable<Boolean>>)
    View.GetSupportedCommands()
    View.GetKeyFromCommand(Command[])
    View.ProcessHotKey(KeyEvent)
    View.ProcessColdKey(KeyEvent)
    View.KeyDown
    View.OnKeyDown(KeyEvent)
    View.KeyUp
    View.OnKeyUp(KeyEvent)
    View.EnsureFocus()
    View.FocusFirst()
    View.FocusLast()
    View.FocusPrev()
    View.FocusNext()
    View.LayoutStarted
    View.LayoutComplete
    View.Initialized
    View.LayoutSubviews()
    View.AutoSize
    View.PreserveTrailingSpaces
    View.TextAlignment
    View.VerticalTextAlignment
    View.TextDirection
    View.IsInitialized
    View.IsAdded
    View.Enabled
    View.Visible
    View.Border
    View.ToString()
    View.GetAutoSize()
    View.GetHotKeySpecifierLength(Boolean)
    View.GetTextFormatterBoundsSize()
    View.GetBoundsTextFormatterSize()
    View.OnMouseEnter(MouseEvent)
    View.OnMouseLeave(MouseEvent)
    View.OnMouseEvent(MouseEvent)
    View.OnMouseClick(View.MouseEventArgs)
    View.OnCanFocusChanged()
    View.OnEnabledChanged()
    View.OnVisibleChanged()
    View.Dispose(Boolean)
    View.BeginInit()
    View.EndInit()
    View.SetWidth(Int32, Int32)
    View.SetHeight(Int32, Int32)
    View.GetCurrentWidth(Int32)
    View.GetCurrentHeight(Int32)
    View.GetNormalColor()
    View.GetTopSuperView()
    Responder.Dispose()
    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, IDisposable, ISupportInitializeNotification, ISupportInitialize

    Constructors

    | Improve this Doc View Source

    ComboBox()

    Public constructor
    Declaration
    public ComboBox()
    | Improve this Doc View Source

    ComboBox(ustring)

    Public constructor
    Declaration
    public ComboBox(ustring text)
    Parameters
    Type Name Description
    NStack.ustring text
    | Improve this Doc View Source

    ComboBox(IList)

    Initialize with the source.
    Declaration
    public ComboBox(IList source)
    Parameters
    Type Name Description
    System.Collections.IList source The source.
    | Improve this Doc View Source

    ComboBox(Rect, IList)

    Public constructor
    Declaration
    public ComboBox(Rect rect, IList source)
    Parameters
    Type Name Description
    Rect rect
    System.Collections.IList source

    Properties

    | Improve this Doc View Source

    ColorScheme

    Declaration
    public ColorScheme ColorScheme { get; set; }
    Property Value
    Type Description
    ColorScheme
    | Improve this Doc View Source

    HideDropdownListOnClick

    Gets or sets if the drop-down list can be hide with a button click event.
    Declaration
    public bool HideDropdownListOnClick { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsShow

    Gets the drop down list state, expanded or collapsed.
    Declaration
    public bool IsShow { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ReadOnly

    If set to true its not allow any changes in the text.
    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SelectedItem

    Gets the index of the currently selected item in the Source
    Declaration
    public int SelectedItem { get; set; }
    Property Value
    Type Description
    System.Int32 The selected item or -1 none selected.
    | Improve this Doc View Source

    Source

    Gets or sets the IListDataSource backing this ComboBox, enabling custom rendering.
    Declaration
    public IListDataSource Source { get; set; }
    Property Value
    Type Description
    IListDataSource The source.
    | Improve this Doc View Source

    Text

    The currently selected list item
    Declaration
    public ustring Text { get; set; }
    Property Value
    Type Description
    NStack.ustring

    Methods

    | Improve this Doc View Source

    Collapse()

    Collapses the drop down list. Returns true if the state chagned or false if it was already collapsed and no action was taken
    Declaration
    public virtual bool Collapse()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Expand()

    Expands the drop down list. Returns true if the state chagned or false if it was already expanded and no action was taken
    Declaration
    public virtual bool Expand()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    MouseEvent(MouseEvent)

    Declaration
    public override bool MouseEvent(MouseEvent me)
    Parameters
    Type Name Description
    MouseEvent me
    Returns
    Type Description
    System.Boolean
    Overrides
    Responder.MouseEvent(MouseEvent)
    | Improve this Doc View Source

    OnCollapsed()

    Virtual method which invokes the Collapsed event.
    Declaration
    public virtual void OnCollapsed()
    | Improve this Doc View Source

    OnEnter(View)

    Declaration
    public override bool OnEnter(View view)
    Parameters
    Type Name Description
    View view
    Returns
    Type Description
    System.Boolean
    Overrides
    View.OnEnter(View)
    | Improve this Doc View Source

    OnExpanded()

    Virtual method which invokes the Expanded event.
    Declaration
    public virtual void OnExpanded()
    | Improve this Doc View Source

    OnLeave(View)

    Declaration
    public override bool OnLeave(View view)
    Parameters
    Type Name Description
    View view
    Returns
    Type Description
    System.Boolean
    Overrides
    View.OnLeave(View)
    | Improve this Doc View Source

    OnOpenSelectedItem()

    Invokes the OnOpenSelectedItem event if it is defined.
    Declaration
    public virtual bool OnOpenSelectedItem()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OnSelectedChanged()

    Invokes the SelectedChanged event if it is defined.
    Declaration
    public virtual bool OnSelectedChanged()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ProcessKey(KeyEvent)

    Declaration
    public override bool ProcessKey(KeyEvent e)
    Parameters
    Type Name Description
    KeyEvent e
    Returns
    Type Description
    System.Boolean
    Overrides
    View.ProcessKey(KeyEvent)
    | Improve this Doc View Source

    Redraw(Rect)

    Declaration
    public override void Redraw(Rect bounds)
    Parameters
    Type Name Description
    Rect bounds
    Overrides
    View.Redraw(Rect)
    | Improve this Doc View Source

    SetSource(IList)

    Sets the source of the ComboBox to an System.Collections.IList.
    Declaration
    public void SetSource(IList source)
    Parameters
    Type Name Description
    System.Collections.IList source

    Events

    | Improve this Doc View Source

    Collapsed

    This event is raised when the drop-down list is collapsed.
    Declaration
    public event Action Collapsed
    Event Type
    Type Description
    System.Action
    | Improve this Doc View Source

    Expanded

    This event is raised when the drop-down list is expanded.
    Declaration
    public event Action Expanded
    Event Type
    Type Description
    System.Action
    | Improve this Doc View Source

    OpenSelectedItem

    This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
    Declaration
    public event Action<ListViewItemEventArgs> OpenSelectedItem
    Event Type
    Type Description
    System.Action<ListViewItemEventArgs>
    | Improve this Doc View Source

    SelectedItemChanged

    This event is raised when the selected item in the ComboBox has changed.
    Declaration
    public event Action<ListViewItemEventArgs> SelectedItemChanged
    Event Type
    Type Description
    System.Action<ListViewItemEventArgs>

    Implements

    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX