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

TListItem

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

Represents the items created in TCustomListView and descendants.

Declaration

Source position: comctrls.pp line 1004

type TListItem = class(TPersistent)

protected

  function IsEqual();

  

Determines if the specified list item has the same values as the current class instance.

  function IsOwnerData; virtual;

  

Determines if the list item has an owner with a valid handle.

  function GetCheckedInternal;

  

True if the member variable for the Checked property contains True.

  function GetOwner; override;

  

Gets the owner of the class instance.

public

  procedure Assign(); override;

  

Copies values from the specified persistent object into the current class instance.

  constructor Create(); virtual;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure Delete;

  

Removes the list item from the container.

  procedure MakeVisible();

  

Makes the item visible in the list view control which owns the container and the list item.

  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.

  function EditCaption;

  

Makes the item the selection in the list view control and displays the editor when allowed.

  function GetStates;

  

Returns all the states for the list 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 associated 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 found.

  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]

  

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

  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

  

Represents the items created in TCustomListView and descendants.

|

TPersistent

?

TObject

Description

TListItem is the base class for the Items created in TCustomListView and TListView.

TListItem provides properties which identify the content for the list item, like: Caption, SubItems, Data, Index, ImageIndeex, and StateIndex. Other properties indicate the disposition of the item in the control, like: Checked, Cut, DropTarget, Focused, and Selected.

Methods are provided that allow the list item to interact with the control and the widgetset class.

TListItem is the type used in the TListItems container.

See also

TListItems

  

TListItems - a list of items with a cache of the last accessed item.

TPersistent

TObject