Table of Contents

Class FlagSelector

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Provides a user interface for displaying and selecting flags. Flags can be set from a dictionary or directly from an enum type.

public class FlagSelector : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation, IDesignable
Inheritance
FlagSelector
Implements
Derived
Inherited Members

Constructors

FlagSelector()

Initializes a new instance of the FlagSelector class.

Properties

AssignHotKeysToCheckBoxes

If true the CheckBoxes will each be automatically assigned a hotkey. UsedHotKeys will be used to ensure unique keys are assigned. Set UsedHotKeys before setting Flags with any hotkeys that may conflict with other Views.

Flags

Gets the flag values and names.

Orientation

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

Styles

Gets or sets the styles for the flag selector.

UsedHotKeys

Gets the list of hotkeys already used by the CheckBoxes or that should not be used if AssignHotKeysToCheckBoxes is enabled.

Value

Gets or sets the value of the selected flags.

Methods

CreateCheckBox(string, uint)
EnableForDesign()

Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.

OnOrientationChanged(Orientation)

Called when Orientation has changed.

OnValueChanged()

Called when Value has changed.

SetFlags(IReadOnlyDictionary<uint, string>)

Set the flags and flag names.

SetFlags<TEnum>()

Set the flags and flag names from an enum type.

SetFlags<TEnum>(Func<TEnum, string>)

Set the flags and flag names from an enum type with custom display names.

Events

OrientationChanged

Raised when Orientation has changed.

OrientationChanging

Raised when Orientation is changing. Can be cancelled.

ValueChanged

Raised when Value has changed.