Table of Contents

Class TuiOptionPicker

Namespace
AshConsoleGraphics.Interactive
Assembly
AshConsoleGraphics.dll

Lets you pick options with the lateral arrows

public class TuiOptionPicker : TuiSelectable
Inheritance
TuiOptionPicker
Inherited Members

Constructors

TuiOptionPicker(string[], Placement, int, int, CharFormat?, CharFormat?)

Initializes a new option picker with selected option 0 with the same text color when selected and when not

public TuiOptionPicker(string[] t, Placement p, int x, int y, CharFormat? f = null, CharFormat? pf = null)

Parameters

t string[]

All options

p Placement
x int
y int
f CharFormat

Text format

pf CharFormat

Selector format

TuiOptionPicker(string[], Placement, int, int, CharFormat?, CharFormat?, CharFormat?)

Initializes a new option picker with selected option 0 with all colors

public TuiOptionPicker(string[] t, Placement p, int x, int y, CharFormat? f, CharFormat? sf, CharFormat? pf)

Parameters

t string[]

All options

p Placement
x int
y int
f CharFormat

Not selected text format

sf CharFormat

Selected text format

pf CharFormat

Selector format

TuiOptionPicker(string[], uint, Placement, int, int, CharFormat?, CharFormat?)

Initializes a new option picker with the same text color when selected and when not

public TuiOptionPicker(string[] t, uint so, Placement p, int x, int y, CharFormat? f = null, CharFormat? pf = null)

Parameters

t string[]

All options

so uint

Index of the selected option

p Placement
x int
y int
f CharFormat

Text format

pf CharFormat

Selector format

TuiOptionPicker(string[], uint, Placement, int, int, CharFormat?, CharFormat?, CharFormat?)

Initializes a new option picker with all colors

public TuiOptionPicker(string[] t, uint so, Placement p, int x, int y, CharFormat? f, CharFormat? sf, CharFormat? pf)

Parameters

t string[]

All options

so uint

Index of the selected option

p Placement
x int
y int
f CharFormat

Not selected text format

sf CharFormat

Selected text format

pf CharFormat

Selector format

Exceptions

ArgumentException

Thrown when t is null or no option was provided (length 0)

Properties

Options

The options

public string[] Options { get; }

Property Value

string[]

SelectedOption

The selected option. Get only

public string SelectedOption { get; }

Property Value

string

SelectedOptionIndex

The index in Options of the selected option

public uint SelectedOptionIndex { get; set; }

Property Value

uint

SelectedTextFormat

Selected text charachter format

public CharFormat? SelectedTextFormat { get; set; }

Property Value

CharFormat

SelectorFormat

Format of the selector pads '>' '<' that surround the element when selcted

public CharFormat? SelectorFormat { get; set; }

Property Value

CharFormat

TextFormat

Not selected text charachter format

public CharFormat? TextFormat { get; set; }

Property Value

CharFormat

Methods

GenerateBuffer()

The method that generates the element's buffer

protected override Buffer GenerateBuffer()

Returns

Buffer