Table of Contents

Class TuiWritable

Namespace
AshConsoleGraphics.Interactive
Assembly
AshConsoleGraphics.dll

Elements where you can write

public abstract class TuiWritable : TuiSelectable
Inheritance
TuiWritable
Derived
Inherited Members

Constructors

TuiWritable(string, int, Placement, int, int)

Base constructor

protected TuiWritable(string t, int l, Placement p, int x, int y)

Parameters

t string

Initial text

l int

length

p Placement
x int
y int

Properties

CanWriteChar

Determines if a char can be written, and returns the string to add to text if possible, null otherwise

public Func<char, string?> CanWriteChar { get; set; }

Property Value

Func<char, string>

Length

The maximum length you can write

public int Length { get; set; }

Property Value

int

Text

The written text

public string Text { get; set; }

Property Value

string

Methods

DelChar()

Attempts to delete a char from the end of the text

public virtual bool DelChar()

Returns

bool

If it was posible to delete

HandleKey(ConsoleKeyInfo)

Handles a key press

public override sealed bool HandleKey(ConsoleKeyInfo keyInfo)

Parameters

keyInfo ConsoleKeyInfo

Returns

bool

Events

OnLengthChange

Will be called when length changes

public event EventHandler OnLengthChange

Event Type

EventHandler