Class InlineMultiColumnSelectWidget
A reusable single-selection list widget whose rows are structured multi-column data rather than one
preformatted string. Each SelectRow supplies one SelectCell per
SelectColumn; the widget maps them onto a real
CliGrid so column widths, alignment,
truncation and the selected-row highlight are all owned by the shared rendering pipeline. The selected
row is styled consistently across every column; non-selected cells keep their own semantic styles.public sealed class InlineMultiColumnSelectWidget : InlineWidget, ICliRenderable
- Inheritance
-
InlineMultiColumnSelectWidget
- Implements
- Inherited Members
Constructors
InlineMultiColumnSelectWidget(ICliAppShell, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?)
Creates a single-selection widget for structured, multi-column rows.
public InlineMultiColumnSelectWidget(ICliAppShell shell, IReadOnlyList<SelectColumn> columns, IReadOnlyList<SelectRow> rows, int? preselectIndex = null)
Parameters
shellICliAppShell- The shell that supplies the theme, culture, and viewport.
columnsIReadOnlyList<SelectColumn>- The column definitions, from left to right.
rowsIReadOnlyList<SelectRow>- The rows available for selection.
preselectIndexint?- The initially selected row index, or
nullfor the first enabled row.
Properties
Columns
The columns, left to right.
public IReadOnlyList<SelectColumn> Columns { get; }
Property Value
EmptyStateTextOverride
Overrides the empty-state text shown when there are no rows.
public string? EmptyStateTextOverride { get; set; }
Property Value
Rows
The rows, top to bottom.
public IReadOnlyList<SelectRow> Rows { get; }
Property Value
SelectedIndex
The selected row index, or
-1 when there is no enabled row.public int SelectedIndex { get; }
Property Value
Methods
HandleKey(KeyEvent)
Handles a key. Returns whether it was consumed and any requested dialog result.
public override InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Converts the component into a grid for measurement and rendering.
public override CliGrid ToGrid()