Select
ConsoleMonster.Interactive
A filtered single-choice layout input. Arrows move; Enter or Space commits the focused choice.
Inheritance
Usage
Explore 24 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 12
- Extension method Select.WithEnabled
- Extension method Select.WithLabel
- Extension method Select.WithPageSize
- Extension method Select.WithTabIndex
- Extension method Select.WithValidationMessage
- Extension method Select.WithValue
- Method SelectFluent.WithEnabled
- Method SelectFluent.WithLabel
- Method SelectFluent.WithPageSize
- Method SelectFluent.WithTabIndex
- Method SelectFluent.WithValidationMessage
- Method SelectFluent.WithValue
Accepted by parameters 12
- Extension method Select.WithEnabled
- Extension method Select.WithLabel
- Extension method Select.WithPageSize
- Extension method Select.WithTabIndex
- Extension method Select.WithValidationMessage
- Extension method Select.WithValue
- Method SelectFluent.WithEnabled
- Method SelectFluent.WithLabel
- Method SelectFluent.WithPageSize
- Method SelectFluent.WithTabIndex
- Method SelectFluent.WithValidationMessage
- Method SelectFluent.WithValue
Constructors
public Select(string name, IEnumerable<Choice> choices) #Creates a single-choice input with no committed value.
Parameters
- name string
- The application-state key.
- choices System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>
- Available choices, configured before running.
Inherited Methods
public bool HandleInput(InputEvent input, RenderContext context) #Parameters
- input InputEvent
- context RenderContext
Returns
boolpublic Size Measure(Constraints constraints, RenderContext context) #Parameters
- constraints Constraints
- context RenderContext
Returns
Sizepublic void Render(Region region, RenderContext context) #Parameters
- region Region
- context RenderContext
Properties
public object? Value { get; set; } #The committed value; null also represents an empty selection. Assign only enabled choices' values.
Exceptions
ArgumentException– A non-null value does not identify an enabled choice.
Inherited Properties
Inherited Events
public event EventHandler<AppValueChangedEventArgs>? Changed #Extension Methods
public static Select WithEnabled(Select select, bool value = true) #Sets InputControl.Enabled: Whether the control accepts input and participates in focus traversal.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value bool = true
- The value (default true).
public static Select WithLabel(Select select, string? value) #Sets InputControl.Label: The visible label, or null to use the name.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value string?
- The value.
public static Select WithPageSize(Select select, int value) #Sets SelectionInputBase.PageSize: The preferred number of choice rows, at least one. Set before running.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value int
- The value.
public static Select WithTabIndex(Select select, int value) #Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value int
- The value.
public static Select WithValidationMessage(Select select, string? value) #Sets InputControl.ValidationMessage: The current validation message below the control, or null.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value string?
- The value.
public static Select WithValue(Select select, object? value) #Sets Select.Value: The committed value; null also represents an empty selection. Assign only enabled choices' values.
Parameters
- select ConsoleMonster.Interactive.Select
- The instance.
- value object?
- The value.