Vcl.ComCtrls.THeaderSections.AddItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddItem(Item: THeaderSection; Index: Integer): THeaderSection;

C++

THeaderSection* __fastcall AddItem(THeaderSection* Item, int Index);

Properties

Type Visibility Source Unit Parent
function public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls THeaderSections

Description

Add section object to collection.

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.

See Also