Vcl.ComCtrls.TCustomListView.Selected

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Selected: TListItem read GetSelected write SetSelected;

C++

__property TListItem* Selected = {read=GetSelected, write=SetSelected};

Properties

Type Visibility Source Unit Parent
property public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomListView

Description

Indicates the first selected item in the list view.

Read Selected to access the properties of the first selected item in the list. If SelCount is 0, Selected is nil (Delphi) or NULL (C++). If SelCount is greater than 1, subsequent selected items can be located by checking the Selected property of the items found using the GetNextItem method.

Set the Selected property to select an item in the list. If MultiSelect is true, setting Selected adds an item to the selection. If MultiSelect is false, setting Selected changes the selection. Setting Selected to nil (Delphi) or NULL (C++) deselects all items in the list.

When an item is selected, the OnChanging and OnChange events are generated.

See Also

Code Examples