Class InlineSelect
Dialog-hostable single-selection list control backed by InlineSelectWidget.
public sealed class InlineSelect : InlineControlBase, ICliRenderable
- Inheritance
-
InlineSelect
- Implements
- Inherited Members
Remarks
The widget owns navigation, selected row state, rendering, and active-point placement. The
control adds dialog-level payload, confirmability, hint text, and widget metadata. The payload is
the selected row index, or
null when the list is empty.Constructors
InlineSelect(ICliAppShell, IReadOnlyList<string?>, int?, CliFormattingMode)
Creates a single-selection control over the supplied labels.
public InlineSelect(ICliAppShell shell, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw)
Parameters
shellICliAppShelllabelsIReadOnlyList<string>preselectIndexint?itemsFormattingModeCliFormattingMode
Properties
CanConfirm
False when there are no selectable items.
public override bool CanConfirm { get; }
Property Value
ControlDecoration
Select controls request a vertical scrollbar.
public override CliControlDecoration ControlDecoration { get; }
Property Value
DialogArea
Select controls are placed in the scrollable in-frame dialog area.
public override InlineDialogArea DialogArea { get; }
Property Value
Hint
Localized select navigation hint.
public override string? Hint { get; }
Property Value
Payload
Selected row index, or
null when no row can be selected.public override object? Payload { get; }
Property Value
ScrollMode
Select controls scroll vertically.
public override CliScrollMode ScrollMode { get; }
Property Value
ThumbMode
The scrollbar thumb follows the logical active point/selected row.
public override CliScrollThumbMode ThumbMode { get; }
Property Value
Methods
GetWidgets()
Exposes one focused, vertically scrollable list widget to the hosting dialog.
public override IReadOnlyList<InlineDialogWidget> GetWidgets()
Returns
HandleKey(KeyEvent)
Delegates list navigation keys to the owned widget; Enter/Escape are left to the dialog.
public override InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Returns the owned widget grid after synchronizing inherited layout settings.
public override CliGrid ToGrid()