RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
THeaderSections.AddItem Method

Add section object to collection.

Pascal
function AddItem(Item: THeaderSection; Index: Integer): THeaderSection;
C++
__fastcall THeaderSection AddItem(THeaderSection Item, int Index);

The AddItem method is similar to the Add method, but is more flexible. 

The Item parameter specifies the section object to add. If Item is nil, then a new panel object is created automatically. To determine the object type at runtime, define the status bar's OnCreateSectionClass event handler. If this event handler is not defined, the new section object is an instance of THeaderSection

The Index parameter determines the Index property of the panel object. If Index is negative, the panel object is added at the end of the collection. 

AddItem returns the panel object added. 

 

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