Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxHeaderSections.Insert(Integer) Method

Inserts a new section into the TcxHeaderSections collection.

#Declaration

Delphi
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:

Delphi
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