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
blockBlockBuilder
Returns
Draw(Buffer, Rect)
Draw the field on the first row inside its block (or area).
public void Draw(Buffer buf, Rect area)
Parameters
Focused(bool)
Show the cursor and use the focused styles.
public TextFieldBuilder Focused(bool focused = true)
Parameters
focusedbool
Returns
Placeholder(string?)
Muted text shown while the field is empty.
public TextFieldBuilder Placeholder(string? placeholder)
Parameters
placeholderstring
Returns
State(TextFieldState)
The text and cursor.
public TextFieldBuilder State(TextFieldState state)
Parameters
stateTextFieldState
Returns
Style(Style)
A style patched over the theme's input style.
public TextFieldBuilder Style(Style style)
Parameters
styleStyle