ButtonGadget and Right Click
Posted: Mon Oct 31, 2011 8:19 am
Hi there,
has andybody succeeded in fetching an eventtype of #PB_EventType_RightClick when using ButtonGadgets on the Mac?
I hoped, this snippet would display the PopUp-Menu when clicking right on the button
The docs say, ButtonGadget is not supported (yet?). Hopefully, it will be soon.
Otherwise, I need to use an ImageGadget, I assume?
has andybody succeeded in fetching an eventtype of #PB_EventType_RightClick when using ButtonGadgets on the Mac?
I hoped, this snippet would display the PopUp-Menu when clicking right on the button

The docs say, ButtonGadget is not supported (yet?). Hopefully, it will be soon.
Otherwise, I need to use an ImageGadget, I assume?
Code: Select all
OpenWindow(0,100,100,400,400,"TEST")
ButtonGadget(0,10,10,380,380,"CLICK ME!")
Repeat
Event = WaitWindowEvent(25)
Gadget = EventGadget()
EventTyp = EventType()
If Event = #PB_Event_Gadget
If EventTyp = #PB_EventType_RightClick ; does not work
If CreatePopupMenu(0)
MenuItem(1, "test")
DisplayPopupMenu(0,WindowID(0))
EndIf
EndIf
If EventTyp = #PB_EventType_LeftClick
End
EndIf
EndIf
ForEver