Table of Contents

Class ColorPicker16

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

A simple color picker that supports the legacy 16 ANSI colors.

public class ColorPicker16 : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IValue<ColorName16>, IValue
Inheritance
ColorPicker16
Implements
Inherited Members
Extension Methods

Remarks

Default key bindings:

KeyAction
Left / RightMoves the selection left or right.
Up / DownMoves the selection up or down.

Default mouse bindings:

Mouse EventAction
Double-ClickAccepts the selected color (Accept).

Constructors

ColorPicker16()

Initializes a new instance of ColorPicker16.

Properties

BoxHeight

Height of a color box

BoxWidth

Width of a color box

Caret

Cursor for the selected color.

SelectedColor

Gets or sets the selected color.

Value

Gets or sets the value.

Methods

OnActivated(ICommandContext?)

Called when the View has been activated. This is called after Accepting has been raised and not cancelled.

OnDrawingContent(DrawContext?)

Called when the View's content is to be drawn. The default implementation does nothing.

OnValueChanged(ValueChangedEventArgs<ColorName16>)

Called when the ColorPicker16 Value has changed.

OnValueChanging(ValueChangingEventArgs<ColorName16>)

Called when the ColorPicker16 Value is changing.

Events

ValueChanged

Raised when Value has changed.

ValueChangedUntyped

Raised when Value has changed, providing the value as an un-typed object.

ValueChanging

Raised when Value is about to change. Set Handled to true to cancel the change.