Skip to main content

TcxHeaderSections.Insert(Integer) Method

Inserts a new section into the TcxHeaderSections collection.

Declaration

function Insert(Index: Integer): TcxHeaderSection;

Parameters

Name Type
Index Integer

Returns

Type
TcxHeaderSection

Remarks

The Insert method inserts a new section into the TcxHeaderSections collection. The items in this collection are displayed as separate sections within the TcxHeader control. If successful, returns the item added.

Parameter Meaning
Item The item you add.
Index Position of the inserted item.

The following code uses the Insert method:

var
  ASection: TcxHeaderSection;
begin
  ASection := cxHeader1.Sections.Insert(1);
  with ASection do
  begin
    Text := 'Inserted Section';
    ImageIndex := 3;
    AutoSize := True;
  end;
end;
Before inserting the new section After inserting the new section
See Also