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

# TCustomHCCreateSectionClassEvent

Specifies the event handler signalled to get the class type for a new section on a THeaderControl instance.

## Declaration

Source position: comctrls.pp line 4028

`type TCustomHCCreateSectionClassEvent = procedure(`
`Sender: TCustomHeaderControl;`
`var SectionClass: THeaderSectionClass`
`) of object;`

## Arguments

`Sender` |  | Object (TCustomHeaderControl) for the event notification.
`SectionClass` |  | Returns the class type used to create a new section on a THeaderControl.

## Description

TCustomHCCreateSectionClassEvent is an object procedure type which specifies an event handler signalled when a new section is created for THeaderControl. It is the type used for the OnCreateSectionClass property in TCustomHeaderControl.

An application can implement and assign a method using the method signature to respond to the event notification. Arguments to the handler include the TCustomHeaderControl for the event notification (Sender) and the class type needed to create a new section for the control (SectionClass).

TCustomHCCreateSectionClassEvent allows a class other than THeaderSection to be used to create a section collection item. The type should, however, be a descendant of THeaderSection as it is the base type expected in the THeaderSections collection.

## See also

THeaderSections |  | Implements a collection for sections in a TCustomHeaderControl control.
THeaderSections.Add |  | Creates a new header section and adds it to the collection.
THeaderSections.AddItem |  | Adds the specified header section at the position specified in Index.
TCustomHeaderControl.OnCreateSectionClass |  | Event handler signalled to get the class type used to create a new section for the header control.
TCustomHeaderControl.Sections |  | Sections - the short segments of the header separated by vertical bars that function as the elementary selection units of the header.
TCustomHeaderControl.CreateSection |  | Creates a new header section for the control.