Right click mouse event??

Windows specific forum
MIZ
New User
New User
Posts: 4
Joined: Tue Feb 17, 2004 7:45 pm
Location: England
Contact:

Right click mouse event??

Post 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?
There are 10 types of people in life. Those who understand binary, and those that don't.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Right click mouse event??

Post 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

:)
MIZ
New User
New User
Posts: 4
Joined: Tue Feb 17, 2004 7:45 pm
Location: England
Contact:

Thankyou, kindly.

Post 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.
There are 10 types of people in life. Those who understand binary, and those that don't.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Thankyou, kindly.

Post 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. :)
Post Reply