Vcl.Grids.TCustomGrid.BeginColumnDrag

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function BeginColumnDrag(var Origin, Destination: Integer;  const MousePt: TPoint): Boolean; dynamic;

C++

DYNAMIC bool __fastcall BeginColumnDrag(int &Origin, int &Destination, const System::Types::TPoint &MousePt);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.Grids.pas
Vcl.Grids.hpp
Vcl.Grids TCustomGrid

Description

Starts the dragging of a column in the grid.

BeginColumnDrag is called automatically when the user clicks on a column to start dragging. It enables the grid to control whether the column can be repositioned and if so, which column.

Origin is the index of the column to be moved. When BeginColumnDrag is called, this is the index of the column in which the mouse was clicked. TCustomGrid does not change this value. However, descendant classes can override this method to adjust which column can be moved.

Destination is the index of where the column should move. When BeginColumnDrag is called, this is the same as Origin. TCustomGrid does not change this value because the mouse has not yet moved. Descendant classes can override this method to adjust the default destination of the column.

MousePt is the coordinates of the mouse button when the user clicked.

BeginColumnDrag returns true if the drag operation is permitted, false if the drag should be disallowed.

See Also