RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomHeaderControl.OnSectionDrag Event

Respond to section drag.

Pascal
property OnSectionDrag: TSectionDragEvent;
C++
__property TSectionDragEvent OnSectionDrag;

The OnSectionDrag event occurs when the user attempts to rearrange header sections by dragging a section to a new position. This event can only occur when the DragReorder property is true. The event handler is passed the following parameters. 

FromSection is the section being dragged. 

ToSection is the section currently occupying the position FromSection was dragged to. If the operation is successful, FromSection will move to this position, and other sections, including ToSection shifted right or left to make room. Note that FromSection and ToSection can be the same section if FromSection was not dragged far enough to trigger a re-arrangement. 

AllowDrag is passed a value of true. Change AllowDrag to false to cancel the operation. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!