Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Right click support?
Wed, Nov 23 2016 10:21 AMPermanent Link

Matthew Jones

Can I intercept the right click on a component? I see mention of right clicks on grids, but can't see any documentation on it.

I'd like to be able to add a pop-up menu on my folder tree to allow changes to details like it's name.

--

Matthew Jones
Thu, Nov 24 2016 9:02 PMPermanent Link

erickengelke

Avatar

"Matthew Jones" wrote:

>Can I intercept the right click on a component? I see mention of right clicks on grids, but can't see any documentation on it.

>I'd like to be able to add a pop-up menu on my folder tree to allow changes to details like it's name.


Hi Mathew,

I use Mouse Down events on my Grid.

procedure MouseDown(Sender: TObject; Button: Integer; ShiftKey, CtrlKey, AltKey: Boolean; X, Y: Integer);
begin
  if  Button = mb_Right then begin
   //
   Menu1.Visible := True;
   Menu1.Top := Y + Grid1.Top;
   Menu1.Left := X;

You often will want to disable the default right-click handler.  How to do that is documented with Google, I haven't translated it to EWB yet because I don't need it for my intended browser.

Erick
Fri, Nov 25 2016 4:22 AMPermanent Link

Matthew Jones

erickengelke wrote:

> "Matthew Jones" wrote:
>
> > Can I intercept the right click on a component? I see mention of right clicks on grids, but can't see any documentation on it.
>
> > I'd like to be able to add a pop-up menu on my folder tree to allow changes to details like it's name.
>
>
> Hi Mathew,
>
> I use Mouse Down events on my Grid.
>
> procedure MouseDown(Sender: TObject; Button: Integer; ShiftKey, CtrlKey, AltKey: Boolean; X, Y: Integer);
> begin
>    if  Button = mb_Right then begin
>     //
>     Menu1.Visible := True;
>     Menu1.Top := Y + Grid1.Top;
>     Menu1.Left := X;
>
> You often will want to disable the default right-click handler.  How to do that is documented with Google, I haven't translated it to EWB yet because I don't need it for my intended browser.
>
> Erick

Thanks, will look into that.

--

Matthew Jones
Image