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
Placementx
inty
intf
CharFormatText format
pf
CharFormatSelector 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
Placementx
inty
intf
CharFormatNot selected text format
sf
CharFormatSelected text format
pf
CharFormatSelector 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
uintIndex of the selected option
p
Placementx
inty
intf
CharFormatText format
pf
CharFormatSelector 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
uintIndex of the selected option
p
Placementx
inty
intf
CharFormatNot selected text format
sf
CharFormatSelected text format
pf
CharFormatSelector 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
SelectedOptionIndex
The index in Options of the selected option
public uint SelectedOptionIndex { get; set; }
Property Value
SelectedTextFormat
Selected text charachter format
public CharFormat? SelectedTextFormat { get; set; }
Property Value
SelectorFormat
Format of the selector pads '>' '<' that surround the element when selcted
public CharFormat? SelectorFormat { get; set; }
Property Value
TextFormat
Not selected text charachter format
public CharFormat? TextFormat { get; set; }
Property Value
Methods
GenerateBuffer()
The method that generates the element's buffer
protected override Buffer GenerateBuffer()