RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.BeginColumnDrag Method

Starts the dragging of a column in the grid.

Pascal
function BeginColumnDrag(var Origin: Integer; var Destination: Integer; const MousePt: TPoint): Boolean; override;
C++
virtual __fastcall Boolean BeginColumnDrag(int Origin, int Destination, const TPoint MousePt);

BeginColumnDrag is called automatically when the user clicks a column to initiate a drag operation. 

Origin is the column number of the column to move. When BeginColumnDrag is called, this is the column under the mouse. BeginColumnDrag may adjust this value to take into account non-scrolling columns. 

Destination is the current destination of the column. On both entry and exit, this is the same as Origin, because the column has not yet moved. 

MousePt is the coordinates of the mouse at the point when the button was clicked. 

BeginColumnDrag returns true if the grid permits the column to be moved, false if the column move should be aborted. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!