Table of Contents

Class TextFieldBuilder

Namespace
MiniTui
Assembly
MiniTui.dll

A single-line text input. It scrolls horizontally by display width to keep the cursor visible, and when focused shows the terminal cursor at the insertion point.

public sealed class TextFieldBuilder
Inheritance
TextFieldBuilder
Inherited Members

Methods

Block(BlockBuilder)

Draw a block around the field. Its border shows focus.

public TextFieldBuilder Block(BlockBuilder block)

Parameters

block BlockBuilder

Returns

TextFieldBuilder

Draw(Buffer, Rect)

Draw the field on the first row inside its block (or area).

public void Draw(Buffer buf, Rect area)

Parameters

buf Buffer
area Rect

Focused(bool)

Show the cursor and use the focused styles.

public TextFieldBuilder Focused(bool focused = true)

Parameters

focused bool

Returns

TextFieldBuilder

Placeholder(string?)

Muted text shown while the field is empty.

public TextFieldBuilder Placeholder(string? placeholder)

Parameters

placeholder string

Returns

TextFieldBuilder

State(TextFieldState)

The text and cursor.

public TextFieldBuilder State(TextFieldState state)

Parameters

state TextFieldState

Returns

TextFieldBuilder

Style(Style)

A style patched over the theme's input style.

public TextFieldBuilder Style(Style style)

Parameters

style Style

Returns

TextFieldBuilder