TextAreaField
ConsoleMonster.Interactive
Several lines of text (notes, change reasons). In a form it shows the first line and the number of further lines; Enter opens the text in a dialog with soft wrap, where Ctrl+Enter saves and Esc keeps the old value.
Inheritance
- Field
- TextAreaField
Usage
Explore 61 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.
Returned or exposed by 31
- Method FormPage.TextArea
- Extension method TextAreaField.Default
- Extension method TextAreaField.DependsOn
- Extension method TextAreaField.Height
- Extension method TextAreaField.Help
- Extension method TextAreaField.Label
- Extension method TextAreaField.MaxLength
- Extension method TextAreaField.MaxLines
- Extension method TextAreaField.MinLength
- Extension method TextAreaField.ParameterName
- Extension method TextAreaField.Placeholder
- Extension method TextAreaField.Remember
- Extension method TextAreaField.Required
- Extension method TextAreaField.ShowWhen
- Extension method TextAreaField.Validate
- Extension method TextAreaField.Value
- Method TextAreaFieldFluent.Default
- Method TextAreaFieldFluent.DependsOn
- Method TextAreaFieldFluent.Height
- Method TextAreaFieldFluent.Help
- Method TextAreaFieldFluent.Label
- Method TextAreaFieldFluent.MaxLength
- Method TextAreaFieldFluent.MaxLines
- Method TextAreaFieldFluent.MinLength
- Method TextAreaFieldFluent.ParameterName
- Method TextAreaFieldFluent.Placeholder
- Method TextAreaFieldFluent.Remember
- Method TextAreaFieldFluent.Required
- Method TextAreaFieldFluent.ShowWhen
- Method TextAreaFieldFluent.Validate
- Method TextAreaFieldFluent.Value
Accepted by parameters 30
- Extension method TextAreaField.Default
- Extension method TextAreaField.DependsOn
- Extension method TextAreaField.Height
- Extension method TextAreaField.Help
- Extension method TextAreaField.Label
- Extension method TextAreaField.MaxLength
- Extension method TextAreaField.MaxLines
- Extension method TextAreaField.MinLength
- Extension method TextAreaField.ParameterName
- Extension method TextAreaField.Placeholder
- Extension method TextAreaField.Remember
- Extension method TextAreaField.Required
- Extension method TextAreaField.ShowWhen
- Extension method TextAreaField.Validate
- Extension method TextAreaField.Value
- Method TextAreaFieldFluent.Default
- Method TextAreaFieldFluent.DependsOn
- Method TextAreaFieldFluent.Height
- Method TextAreaFieldFluent.Help
- Method TextAreaFieldFluent.Label
- Method TextAreaFieldFluent.MaxLength
- Method TextAreaFieldFluent.MaxLines
- Method TextAreaFieldFluent.MinLength
- Method TextAreaFieldFluent.ParameterName
- Method TextAreaFieldFluent.Placeholder
- Method TextAreaFieldFluent.Remember
- Method TextAreaFieldFluent.Required
- Method TextAreaFieldFluent.ShowWhen
- Method TextAreaFieldFluent.Validate
- Method TextAreaFieldFluent.Value
Constructors
public TextAreaField(string key, string? label = null) #Creates the field.
Parameters
- key string
- The key.
- label string? = null
- The label.
Methods
public override string Display(object? value, PromptLabels labels) #The value as shown in the form and on the review page.
Parameters
- value object?
- The value.
- labels ConsoleMonster.Interactive.PromptLabels
- The labels.
Returns
string The text.Inherited Methods
Properties
Inherited Properties
Extension Methods
public static TextAreaField Default(TextAreaField textAreaField, object? value) #Sets Field.Default: The declared default: the starting value until a value is set, and values equal to it are left out of the equivalent command.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Default = value; textAreaField.Default(value);public static TextAreaField DependsOn(TextAreaField textAreaField, string item) #Adds an item to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- item string
- The item.
public static TextAreaField DependsOn(TextAreaField textAreaField, IEnumerable<string> items) #Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static TextAreaField Height(TextAreaField textAreaField, int value) #Sets TextAreaField.Height: The visible rows of the editor (default 8).
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Height = value; textAreaField.Height(value);public static TextAreaField Help(TextAreaField textAreaField, string? value) #Sets Field.Help: Help shown while the field has focus.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Help = value; textAreaField.Help(value);public static TextAreaField Label(TextAreaField textAreaField, string value) #Sets Field.Label: The label.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Label = value; textAreaField.Label(value);public static TextAreaField MaxLength(TextAreaField textAreaField, int value) #Sets TextAreaField.MaxLength: The most characters.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.MaxLength = value; textAreaField.MaxLength(value);public static TextAreaField MaxLines(TextAreaField textAreaField, int value) #Sets TextAreaField.MaxLines: The most lines.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.MaxLines = value; textAreaField.MaxLines(value);public static TextAreaField MinLength(TextAreaField textAreaField, int value) #Sets TextAreaField.MinLength: The fewest characters.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.MinLength = value; textAreaField.MinLength(value);public static TextAreaField ParameterName(TextAreaField textAreaField, string? value) #Sets Field.ParameterName: The command-line parameter this field supplies (Domain, -Domain, --domain); null leaves the field out of the equivalent command.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.ParameterName = value; textAreaField.ParameterName(value);public static TextAreaField Placeholder(TextAreaField textAreaField, string? value) #Sets TextAreaField.Placeholder: Muted text while empty.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Placeholder = value; textAreaField.Placeholder(value);public static TextAreaField Remember(TextAreaField textAreaField, bool value = true) #Sets Field.Remember: Whether the value is kept in presets and remembered choices (never for secrets).
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
textAreaField.Remember = value; textAreaField.Remember(value);public static TextAreaField Required(TextAreaField textAreaField, bool value = true) #Sets Field.Required: Whether an empty value is refused.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
textAreaField.Required = value; textAreaField.Required(value);public static TextAreaField ShowWhen(TextAreaField textAreaField, Func<FormValues, bool>? value) #Sets Field.VisibleWhen: Shows the field only while this returns true.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value System.Func<ConsoleMonster.Interactive.FormValues, bool>?
- The callback.
Examples
// C# initializer or property // C# fluent
textAreaField.VisibleWhen = value; textAreaField.ShowWhen(value);public static TextAreaField Validate(TextAreaField textAreaField, Func<object?, FormValues, string?>? value) #Sets Field.Validator: A validator: returns an error message, or null when the value is fine.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value System.Func<object?, ConsoleMonster.Interactive.FormValues, string?>?
- The callback.
Examples
// C# initializer or property // C# fluent
textAreaField.Validator = value; textAreaField.Validate(value);public static TextAreaField Value(TextAreaField textAreaField, object? value) #Sets Field.Value: The current value.
Parameters
- textAreaField ConsoleMonster.Interactive.TextAreaField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
textAreaField.Value = value; textAreaField.Value(value);