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

TListItem.StateIndex

Ordinal position for the image used to represent the state for the list item.

Declaration

Source position: comctrls.pp line 1080

public property TListItem.StateIndex : TImageIndex
  read GetStateIndex
  write SetStateIndex;

Description

StateIndex is a TImageIndex property with the position for the image used to represent the state for the list item. It is the position in the StateImages for the ListView control, or -1 when a value has not been explicitly assigned to the property. Changing the property values causes the widgetset class instance for the ListView control to be updated.

StateIndex is normally updated when the ListView control changes the usage context for the list item, and uses the set type returned from the GetStates method. StateIndex values and their TListItemStates equivalents:

-1
A value has not been assigned.
0
Used when GetStates is an empty set ([]).
1
Used when GetStates contains lisCut. Cut is True.
2
Used when GetStates contains lisDropTarget. DropTarget is True.
3
Used when GetStates contains lisSelected. Selected is True.
4
Used when GetStates contains lisFocused. Focused is True.

See also

TListItem.GetStates

  

Returns all the states for the list item.

TCustomListView.StateImages

  

Image list with the state images for the items on the control.

TListItemState

  

Represents state values for items in a list view control.


Version 3.2 Generated 2024-02-25 Home