RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomVirtualListAction.Count Property

Indicates the number of items this list action represents.

Pascal
property Count: Integer;
C++
__property int Count;

Read Count to determine the number of items the list action supplies to client controls. This value provides an upper limit to the index that is supplied to the GetItem method or the Strings property in order to fetch individual items. 

In TCustomListAction, the value of Count is supplied by the OnGetItemCount event handler. If there is no OnGetItemCount event handler, the value of Count is –1. Thus, a Count of –1 indicates that Count is not defined, as opposed to 0, which indicates that there are no items.

Note: TCustomListAction descendants can override the Count property access method to supply a value to Count that does not rely on an event handler. For example, TStaticListAction stores all of its items in an internal list, and overrides GetCount to indicate the number of items in that list.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!