Board index » delphi » Right mouse click on Grid

Right mouse click on Grid

On Which event do i write my code to perfrom something? The closest idea i
have is on the 'onClick' event

--
Chris Lekkas
Software Developer
chris.lek...@guisoftware.com
www.guisoftware.com

 

Re:Right mouse click on Grid


Use the OnMouseDown event then determine which mouse button was
clicked by the value of Button. It can be mbLeft, mbMiddle or mbRight;

Example:

procedure TForm.DbGrid1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbRight then
  begin
    Your code here
  end;
end;

Cheers
Don

On Fri, 26 May 2000 21:08:01 GMT, "Chris Lekkas"

Quote
<chris.lek...@guisoftware.com> wrote:
>On Which event do i write my code to perfrom something? The closest idea i
>have is on the 'onClick' event

Other Threads