[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 1009

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 list item.

  function DisplayRect();

  

Gets the display rectangle for the specified region of the list item on its list view control.

  function DisplayRectSubItem();

  

Gets the the display rectangle coordinates for a region in the specified sub-item on its list view control.

  function EditCaption;

  

Selects the list item and displays its editor when possible.

  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]

  

Displays a check mark to allow the list item to be include in list view operations.

  property Cut: Boolean; [rw]

  

Indicates if the list item has been cut from the list but it can be pasted to the clipboard.

  property Data: Pointer; [rw]

  

Pointer to arbitrary Data associated with the list item.

  property DropTarget: Boolean; [rw]

  

True if the list item is a highlighted drop target in the list view control.

  property Focused: Boolean; [rw]

  

True if the list item is focused on the list view control.

  property Index: Integer; [r]

  

Ordinal position for the list item in its TListItems container.

  property ImageIndex: TImageIndex; [rw]

  

Ordinal position for the image displayed for the list item.

  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]

  

Container that is the Owner of the list item.

  property Position: TPoint; [rw]

  

The coordinates where the list item is located on its list view control.

  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]

  

Contains text displayed as additional columns on the list view control.

  property SubItemImages []: Integer; [rw]

  

Gets the ImageIndex for the sub-item at the specified position.

  property Top: Integer; [rw]

  

Top coordinate for the list item.

end;

Inheritance

TListItem

  

Represents the items created in TCustomListView and descendants.

|

TPersistent,IFPObserved

|

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, ImageIndex, 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 stored in the TListItems container.

See also

TListItems

  

Implements a container for list items on a list view control.

TCustomListView.Items

  

Collection of list items displayed on the list view control.

TPersistent

TObject


Version 3.2 Generated 2024-02-25 Home