Table of Contents

Class TuiNumberPicker

Namespace
AshConsoleGraphics.Interactive
Assembly
AshConsoleGraphics.dll

Lets you pick between a number range with the lateral arrows

public class TuiNumberPicker : TuiSelectable
Inheritance
TuiNumberPicker
Inherited Members

Constructors

TuiNumberPicker(int, int, int, int, Placement, int, int, CharFormat?, CharFormat?)

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

public TuiNumberPicker(int lower, int upper, int interval, int num, Placement p, int x, int y, CharFormat? f = null, CharFormat? pf = null)

Parameters

lower int

Lower bound

upper int

Upper bound

interval int

Increment interval

num int

Initial selected number

p Placement
x int
y int
f CharFormat

Text format

pf CharFormat

Selector format

TuiNumberPicker(int, int, int, int, Placement, int, int, CharFormat?, CharFormat?, CharFormat?)

Initializes a new number picker with all colors

public TuiNumberPicker(int lower, int upper, int interval, int num, Placement p, int x, int y, CharFormat? f, CharFormat? sf, CharFormat? pf)

Parameters

lower int

Lower bound

upper int

Upper bound

interval int

Increment interval

num int

Initial selected number

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 lower isgreater than upper

Fields

Interval

What the selected number will be incremented/decremented each time an arrow is pressed

public int Interval

Field Value

int

Properties

LowerLimit

Lower bound on the number

public int LowerLimit { get; set; }

Property Value

int

Number

Selected number

public int Number { get; set; }

Property Value

int

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

UpperLimit

Upper bound on the number

public int UpperLimit { get; set; }

Property Value

int

Methods

GenerateBuffer()

The method that generates the element's buffer

protected override Buffer GenerateBuffer()

Returns

Buffer

NumberDown(TuiSelectable, ConsoleKeyInfo)

Decrements the number by the interval

public void NumberDown(TuiSelectable s, ConsoleKeyInfo ck)

Parameters

s TuiSelectable
ck ConsoleKeyInfo

NumberUp(TuiSelectable, ConsoleKeyInfo)

Increments the number by the interval

public void NumberUp(TuiSelectable s, ConsoleKeyInfo ck)

Parameters

s TuiSelectable
ck ConsoleKeyInfo