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

# TListItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TListItem - the ancestor class for the Items in TCustomListView and TListView

## Declaration

Source position: comctrls.pp line 697

`type TListItem = class(TPersistent)`
`protected`
`function IsEqual();` |  | The current ListItem IsEqual to the item specified in the argument AItem
`function GetCheckedInternal;` |  | GetCheckedInternal - returns True if item is internally checked
`function GetOwner; override;`
`public`
`procedure Assign(); override;` |  | Assign - if source has correct type, copies Caption, Data, ImageIndex and SubItems from source, otherwise calls inherited Assign which probably raises an exception
`constructor Create();` |  | Create - constructor for TListItem: calls inherited Create then initialises flags, states, ImageIndex and SubItems
`destructor Destroy; override;` |  | Destroy - destructor for TListItem: frees SubItems, sets flags to signify destruction, then calls inherited Destroy
`procedure Delete;` |  | Remove an Item from the list
`procedure MakeVisible();` |  | MakeVisible - render the item visible (if PartialOK is True, only part may be visible)
`function DisplayRect();` |  | DisplayRect - returns the coordinates of a rectangle for displaying the current item
`function DisplayRectSubItem();` |  | DisplayRectSubItem - returns the coordinates of a display rectangle for a specified sub-item
`property Caption: String; [rw]` |  | Caption - the name given to this item on the list
`property Checked: Boolean; [rw]` |  | Checked - if True, a check mark is present beside the item, implying it has been selected
`property Cut: Boolean; [rw]` |  | Cut this item from the list (but it can be placed on the clipboard)
`property Data: Pointer; [rw]` |  | Pointer to the Data asociated with this item
`property DropTarget: Boolean; [rw]` |  | DropTarget - returns True if this is a valid target on the list for dropping
`property Focused: Boolean; [rw]` |  | Property is true if this item has Focus
`property Index: Integer; [r]` |  | The index of this item in the list (integer)
`property ImageIndex: TImageIndex; [rw]` |  | The index of the image associated with this Item in the list
`property Left: Integer; [rw]` |  | The position of the Left side of the list item
`property ListView: TCustomListView; [r]` |  | The ListView in which this Item is fould
`property Owner: TListItems; [r]` |  | The Owner of the ListItem
`property Position: TPoint; [rw]` |  | The coordinates of the position where the ListItem is located
`property Selected: Boolean; [rw]` |  | Whether this Item has been Selected (often denoted by a check-mark)
`property StateIndex: TImageIndex; [rw]`
`property SubItems: TStrings; [rw]` |  | The list of SubItems associated with this ListItem
`property SubItemImages: Integer; [rw]` |  | SubItemImages - the list of Images associated with the SubItems
`property Top: Integer; [rw]` |  | The position of the Top of this ListItem
`end;`

## Inheritance

`TListItem` |  | TListItem - the ancestor class for the Items in TCustomListView and TListView
`TPersistent`
`TObject`

## Description

Most properties are inherited from ancestors, TPersistent and TObject

## See also

Classes.TPersistent
Objects.TObject

The latest version of this document can be found at lazarus-ccr.sourceforge.net.