Table of Contents

Class SelectorBase

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

The abstract base class for OptionSelector<TEnum> and FlagSelector<TFlagsEnum>.

public abstract class SelectorBase : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation
Inheritance
SelectorBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

SelectorBase()

Initializes a new instance of the SelectorBase class.

Properties

DefaultMouseHighlightStates

Gets or sets the default Highlight Style.

DoubleClickAccepts

Gets or sets whether double-clicking on an Item will cause the Accepting event to be raised.

HorizontalSpace

Gets or sets the horizontal space for this OptionSelector if the Orientation is Horizontal

Labels

Gets or sets the list of labels for each value in Values.

Orientation

Gets or sets the Orientation for this SelectorBase. The default is Vertical.

Styles

Gets or sets the styles for the flag selector.

Value

Gets or sets the value of the selector. Will be null if no value is set.

Values

Gets or sets the option values. If Values is null, get will return values based on the Labels property.

Methods

CreateCheckBox(string, int)

INTERNAL: Creates a checkbox subview

CreateSubViews()

Creates the subviews for this selector.

OnCreatedSubViews()

Called after CreateSubViews() creates the default subviews (Checkboxes and ValueField).

OnCreatingSubViews()

Called before CreateSubViews() creates the default subviews (Checkboxes and ValueField).

OnHandlingHotKey(CommandEventArgs)

Called when the View is handling the user pressing the View's HotKey. Set CommandEventArgs.Handled to true to indicate the event was handled and processing should stop.

OnOrientationChanged(Orientation)

Called when Orientation has changed.

OnValueChanged(int?, int?)

Called when Value has changed.

RaiseValueChanged(int?)

Raised the ValueChanged event.

SetValuesAndLabels<TEnum>()

Set Values and Labels from an enum type.

UpdateChecked()

Called when the checked state of the checkboxes needs to be updated.

Events

OrientationChanged

Raised when Orientation has changed.

OrientationChanging

Raised when Orientation is changing. Can be cancelled.

ValueChanged

Raised when Value has changed.