Hi Tom,

> Can you detect a right-click event? Can you detect the cursor
position?
> Can you translate a coordinate into its corresponding cell? If you can
> do all those, then you're all set.
>>
>> How to do this is the rub!...:-)  That's why I was hoping I could
>> piggyback an existing event.  Is there a way to detect a right click
>> inside the OnCellClick event?  If I could do this then I would be all
>> set!

You could probably call TDBGrid's MouseCoord() method (inherited from
TCustomGrid). Quoting Delphi's help,

>----------
Returns the row and column indexes of the cell that contains a point
specified in screen coordinates.

type TGridCoord = record

    X: Longint;
    Y: Longint;
  end;

function MouseCoord(X, Y: Integer): TGridCoord;

Description

Call MouseCoord to locate the column and row of the cell which contains
a given screen coordinate. Usually, MouseCoord is used to locate the
cell that is under the mouse.
----------<

Reply via email to