Page 1 of 1

Right click mouse event??

Posted: Tue Feb 17, 2004 10:26 pm
by MIZ
I'm trying to get a response from a ButtonImageGadget being clicked, but using the right mouse button. Is this possible at all?

The EventType() command says it captures this? So, my code looks like this:-

Code: Select all

Event = EventType() 
  Left_Pressed =0
  Right_Pressed =0

  If Event = #PB_EventType_LeftClick
    Left_Pressed =1
  EndIf       
  
  If Event = #PB_EventType_RightClick      
    Right_Pressed =1
  EndIf
Problem seems to be that :-

Code: Select all

EventID = WaitWindowEvent()
- doesn't catch the right button press?

So, does anyone know a work-around?

Re: Right click mouse event??

Posted: Wed Feb 18, 2004 1:26 am
by PB
> I'm trying to get a response from a ButtonImageGadget being clicked,
> but using the right mouse button. Is this possible at all?

Yes. I did a search for ButtonImageGadget here and found this:

viewtopic.php?t=9347

:)

Thankyou, kindly.

Posted: Wed Feb 18, 2004 2:10 am
by MIZ
I'll give it a whirl - think I immediately spt an error in my own code, thanks to you!

:oops: I didn't do a site search, so, consider this a slap on the wrists for me, and I'll go skulk for a while, and try your method! :( :D

TY kindly.

Re: Thankyou, kindly.

Posted: Wed Feb 18, 2004 2:20 am
by PB
> I didn't do a site search

That's okay. :) I like to stress the importance of doing so, because you'll
get an answer much faster (usually) than waiting for someone to respond.

> I'll go skulk for a while, and try your method!

It's actually Danilo's code -- I just linked to it. :)