Class InlineMultiSelect
Dialog-hostable multi-selection checklist control.
public sealed class InlineMultiSelect : InlineControlBase, ICliRenderable
- Inheritance
-
InlineMultiSelect
- Implements
- Inherited Members
Remarks
The payload is an
int[] of selected indexes in original item order, or null when the
list has no items. Empty selection is valid when items exist. Keyboard behavior follows the
standard checklist model: Up/Down/PageUp/PageDown/Home/End move the active row, Space toggles
the active row, and +, -, and * select all, clear all, or invert all.
Enter/Escape are left to the hosting dialog.Constructors
InlineMultiSelect(ICliAppShell, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode)
Creates a multi-selection checklist.
public InlineMultiSelect(ICliAppShell shell, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw)
Parameters
shellICliAppShelllabelsIReadOnlyList<string>preselectedIndexesIReadOnlyCollection<int>itemsFormattingModeCliFormattingMode
Properties
CanConfirm
False when there are no items; empty selection is valid when items exist.
public override bool CanConfirm { get; }
Property Value
ControlDecoration
Multi-select controls request a vertical scrollbar.
public override CliControlDecoration ControlDecoration { get; }
Property Value
DialogArea
Multi-select controls are placed in the scrollable in-frame dialog area.
public override InlineDialogArea DialogArea { get; }
Property Value
Hint
Localized checklist navigation hint.
public override string? Hint { get; }
Property Value
HintMode
Checklist hints are raw localized text.
public override CliFormattingMode HintMode { get; }
Property Value
Payload
Selected indexes in original item order, or
null when there are no items.public override object? Payload { get; }
Property Value
ScrollMode
Multi-select controls scroll vertically.
public override CliScrollMode ScrollMode { get; }
Property Value
ThumbMode
The scrollbar thumb follows the logical active row.
public override CliScrollThumbMode ThumbMode { get; }
Property Value
Methods
HandleKey(KeyEvent)
Handles checklist navigation and toggle keys; Enter/Escape are not consumed.
public override InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Renders a two-column checklist grid: marker column plus item label column. The active row is
exposed through
ActivePoint so the hosting dialog can scroll to it.public override CliGrid ToGrid()