[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Contains the selected list item in the list view control.
Source position: comctrls.pp line 1656
public property TCustomListView.Selected : TListItem |
Selected is a TListItem property which contains the selected list item in the list view control. Assign a value from the Items property to select the list item.
When MultiSelect is enabled, Selected represents the first entry in Items that has its Selected property set to True. If none of the list items has its Selected property set to True, or SelCount is 0, the property value is Nil.
When OwnerData (or Virtual Mode) is enabled, Selected refers to the most recent owner data item retrieved when the value in ItemIndex was changed. If the item index was set to -1, the property value is Nil.
Assigning a new value to Selected causes the existing list item in the property to be updated. In single select mode (MultiSelect = False), the Selected property for the list item is set to False prior to clearing or reassigning the property value.
When MultiSelect is enabled, setting a new value for the property causes the list item to be included in the list of multi-selected Items. If the new value is Nil, all of the entries in Items reset their Selected properties to False. In short, setting Selected to Nil clears any existing multi-selections in Items.
Setting a new value for the property causes the OnChange and OnSelectItem event handlers to be signalled (when assigned) when the LVN_ITEMCHANGED notification message is handled for the control.
Use ClearSelection to remove all selections (single or multi-) for the control.
Use SelectAll to select all list items when MultiSelect is enabled.
|
Enables or disables owner data (virtual) mode for the list view control. |
|
|
Allows simultaneous selection of one or more list items using Ctrl+Click, Shift+Click, Ctrl+Shift+Click, or using program code. |
|
|
Ordinal position for the selected list item on the control. |
|
|
Collection of list items displayed on the list view control. |
|
|
Clears single or multi-selections in the control. |
|
|
Selects all Items in the control when MultiSelect has been enabled. |
|
|
Whether this Item has been Selected (often denoted by a check-mark). |
|
|
Count - the number of items in the collection. |
|
|
Sets the internal index position for the virutal item. |
lazarus-ccr.sourceforge.net |