Sign in Join
FPDoc Onlineexperiment

TCustomHeaderControl.SectionDrag function

Member of TCustomHeaderControlprotectedIn unit ComCtrls

Signals the OnSectionDrag event handler (when assigned and enabled).

Declaration

pascal
function SectionDrag(FromSection: THeaderSection; 
 ToSection: THeaderSection): Boolean; virtual

Arguments

FromSection

Section to be dragged on the header control.

ToSection

Section that is the potential drop target for the drag operation.

Function result

True if the drag operation can be performed the selected section.

Description

SectionDrag is a Boolean function used to signal the OnSectionDrag event handler when a drag operation is started for a section on the header control. The return value is True if the DragReorder property is enabled, and the OnSectionDrag event handler has been assigned and allows the drag operation for the specified source and destination sections.

No actions are performed in the method if DragReorder is set to False.

Update the AllowDrag argument in the TSectionDragEvent handler to indicate whether the section in FromSection can be dragged to the position for the section in ToSection.

SectionDrag is called from the MouseMove method when a Shift+Left mouse button event is detected on one of the Sections for the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.