[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# THeaderSections.AddItem

Adds the specified header section at the position specified in Index.

## Declaration

Source position: comctrls.pp line 4016

`public function THeaderSections.AddItem(`
`Item: THeaderSection;`
`Index: Integer`
`):THeaderSection;`

## Arguments

`Item` |  | Header section to add in the method, or Nil to create a new one.
`Index` |  | Ordinal position in the collection where the header section is stored.

## Function result

Header section created (optional) and stored in the method.

## Description

The THeaderSection instance in Item is created when the argument value is Nil (unassigned). The return value contains the new header section instance, or the existing value in Item when it is assigned.