Skip to content
ConsoleMonster
Class

TextArea

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

Draws a TextAreaEditor: the text soft-wrapped at word boundaries behind a muted bar, a fixed number of visible rows scrolled to keep the caret in view, a placeholder while empty, and the caret reported to the CaretSlot. The layout it computes is what Up and Down move through.

Inheritance

Usage

Explore 36 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 18

Constructors

public TextArea(string name, string? value = null) #

Creates a named multiline input using the shared text-area editor.

Parameters

name string required
The application-state key.
value string? = null optional
The initial text.

Properties

public string? Placeholder { get; set; } #

Muted text shown when the value is empty.

public int Height { get; set; } #

The visible rows (default 6).

public int ScrollRow { get; set; } #

The first visible row (kept between frames).

public string Value { get; set; } #

The multiline text value.

public int MaxLength { get; set; } #

The maximum text length, in UTF-16 units.

Extension Methods

public static TextArea WithEnabled(TextArea textArea, bool value = true) #

Sets InputControl.Enabled: Whether the control accepts input and participates in focus traversal.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value bool = true optional
The value (default true).

Returns

TextArea The same instance.
public static TextArea WithHeight(TextArea textArea, int value) #

Sets TextArea.Height: The visible rows (default 6).

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value int required
The value.

Returns

TextArea The same instance.
public static TextArea WithLabel(TextArea textArea, string? value) #

Sets InputControl.Label: The visible label, or null to use the name.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value string? required
The value.

Returns

TextArea The same instance.
public static TextArea WithMaxLength(TextArea textArea, int value) #

Sets TextArea.MaxLength: The maximum text length, in UTF-16 units.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value int required
The value.

Returns

TextArea The same instance.
public static TextArea WithPlaceholder(TextArea textArea, string? value) #

Sets TextArea.Placeholder: Muted text shown when the value is empty.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value string? required
The value.

Returns

TextArea The same instance.
public static TextArea WithScrollRow(TextArea textArea, int value) #

Sets TextArea.ScrollRow: The first visible row (kept between frames).

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value int required
The value.

Returns

TextArea The same instance.
public static TextArea WithTabIndex(TextArea textArea, int value) #

Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value int required
The value.

Returns

TextArea The same instance.
public static TextArea WithValidationMessage(TextArea textArea, string? value) #

Sets InputControl.ValidationMessage: The current validation message below the control, or null.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value string? required
The value.

Returns

TextArea The same instance.
public static TextArea WithValue(TextArea textArea, string value) #

Sets TextArea.Value: The multiline text value.

Parameters

textArea ConsoleMonster.Interactive.TextArea required
The instance.
value string required
The value.

Returns

TextArea The same instance.