Sign in Join
FPDoc Onlineexperiment

TShellListView.MultiSelect property

Member of TShellListViewpublishedIn unit ShellCtrls

Declaration

pascal
property MultiSelect: ;

Description

Not described here; this is what TCustomListView.MultiSelect says of it:

Allows simultaneous selection of one or more list items using Ctrl+Click, Shift+Click, Ctrl+Shift+Click, or using program code.

MultiSelect is a Boolean property which indicates if multiple simultaneous item selections are allows in the list view control. The default value for the property is False, and allows a single selection as reflected in the Selected property.

When set to True, multiple entries in the Items property can be marked as Selected. This can be achieved in program code by iterating over the TListItem instances in Items, and setting the Selected property for the appropriate items. At run-time, the mouse can be use toggle the selected state for one or more of the list items.

Click
Toggles the selected state for the list item under the mouse pointer.
Shift+Click
Toggles the selected state for a contiguous block of list items from the mouse pointer to the previous item selection.
Ctrl+Click
Toggles the selected state list item under the mouse pointer without altering the previously selected list items.
Ctrl+Shift+Click
Toggles the selected state for a contiguous block of list items from the mouse pointer to the previously focused list item.

MultiSelect is one of the TListViewProperty values included in the TListViewProperties set type and exchanged with the widgetset class. The property value is read from and written to the TCustomTreeview widgetset class instance when its handle is valid. Changing the value for the property causes the widgetset class to be updated with the new value.

Use SelCount to get the number of selected items when MultiSelect is enabled. Use Items to access the list items to check the values in their Selected properties.

Use SelectAll to set the selected state to True for all of the Items on the control.

Use ClearSelection to clear the selected state for all of the Items on the control.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.