Sign in Join
FPDoc Onlineexperiment

TCustomHeaderControl.GetSectionAt function

Member of TCustomHeaderControlpublicIn unit ComCtrls

Gets the header section at the position specified in P.

Declaration

pascal
function GetSectionAt(P: TPoint): Integer

Description

GetSectionAt is an Integer function used to get the position for the header section found at the coordinates in P.

GetSectionAt iterates over the THeaderSection instances in Sections to find a matching collection item. A match is found when the X- axis coordinate in P is within the Left and Right values for the header section.

The return value contains the ordinal position in Sections where the header section is stored, or -1 if a header section was not found for the coordinates.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.