Sign in Join
FPDoc Onlineexperiment

TListItems class

In unit ComCtrls

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

Declaration

pascal
TListItems = class(TPersistent)

Inheritance

  1. TListItems
  2. TPersistent
  3. TObject

Descends from it: TOwnerDataListItems

Description

TListItems is a TPersistent descendant which implements the container used to store TListItem instances used in a TCustomListView control. The Owner of the container is the TCustomListView control passed as an argument to the constructor.

TListItems is the type used to implement the Items property in TCustomListView.

TListItems provides properties and methods needed to maintain and access the TListItem instances stored in the list for the container. Item is the default property for the class instance and allows access to the list items by their ordinal position in the container. It also the target for an enumerator using the TListItemsEnumerator supported in the class instance.

TListitems has a built-in cache for the last accessed item. This will speed up interface updates since Item.Index is often used for the same item updating more properties. If FCacheIndex contains -1 then the cache is not valid.

See also

Properties

FlagspublicContains the flag values currently assigned to the list.
CountpublicThe number of TListItem instances stored in the container.
ItempublicProvides indexed access to the TListItem instance in the container by their ordinal position.
OwnerpublicList view control that is the owner of the container and its list items.

Methods

DefinePropertiesprotectedDefines read and write routines used for binary Data in the list items for the container.
GetCountprotectedGets the value for the Count property.
GetItemprotectedGets the value for the indexed Item property.
GetOwnerprotectedGets the value for the Owner property.
WSCreateItemsprotectedCreates list items in the widgetset class, and cache entries for the values.
DoFinalizeWndprotectedUpdates flags in the class instance when the widgetset handle is freed.
SetCountprotectedSets the value for the Count property.
SetItemprotectedSet the value in the indexed Item property.
ClearSelectionprotectedClears the selected state for all TListItem instances in the container.
SelectAllprotectedSets the selected state to True for all TListItem instances in the container.
AddpublicAdds a new list item to the container.
AddItempublicAdds the specified list item to the storage for the container.
BeginUpdatepublicStarts an update process for the container and its list view control.
ClearpublicRemoves all list item instances stored in the container.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
DeletepublicRemoves the list item specified in AIndex from the container.
EndUpdatepublicEnds an update process for the container and its list view control.
ExchangepublicExchanges the positions for the specified list items in the container.
MovepublicMoves the list item at the specified position to a new position in the container.
FindCaptionpublicLocates a list item with the specified caption starting at given position in the container.
FindDatapublicLocates the list item which has the specified values in its Data property.
GetEnumeratorpublicGets an enumerator for the list items in the container.
IndexOfpublicGets the ordinal position in the container for the specified list item.
InsertpublicCreates and inserts a list item at the specified ordinal position in the container.
InsertItempublicInserts the specified list item at the specified position in the internal storage for the container.

Inherited

From TPersistent (6)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.