[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomListView.UpdateMultiSelList

Updates the specified list item in the multi-selection list for the control.

Declaration

Source position: comctrls.pp line 1562

protected procedure TCustomListView.UpdateMultiSelList(

  AItem: TListItem;

  Add: Boolean

);

Arguments

AItem

  

The TListItem instance that is added or removed in the method.

Add

  

True to add the list item to the multi-selection list. False to remove the item from the multi-selection list.

Description

UpdateMultiSelList is a method used to add or remove the list item specified in AItem in the multi-selection list for the control. It calls the corresponding method in the widgetset class instance to apply the argument values.

The widget ensures that the internal TIntegerList instance used for multi-selected items is allocated when needed.

AItem is the TListItem instance added or removed in the method. When Add is True, the index for the list item is added to the multi-selection list if it is not already present. The Sort method in the list is called to reorder the index values after the addition. When Add is False, the index for the list item is deleted from the multi-selection list.

UpdateMultiSelList is called from the CNNotify method when LVN_ITEMCHANGED messages are handled for the control and both MultiSelect and OwnerData are enabled.

See also

TCustomListView.FMultiSelList

  

Member used to store the multi-selection list in the class instance.

TCustomListView.MultiSelect

  

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

TCustomListView.OwnerData

  

Enables or disables owner data (virtual) mode for the list view control.

TListItem.Index

  

Ordinal position for the list item in its TListItems container.

TIntegerList


Version 3.2 Generated 2024-02-25 Home