Code: Select all
OpenWindow(0,0,0,800,600,"",#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_SizeGadget)
ButtonGadget(0,200,100,100,50,"ok")
CanvasGadget(1,200,250,100,100)
CreateImage(0,100,100)
StartDrawing(ImageOutput(0))
Box(0,0,100,100,0)
StopDrawing()
ImageGadget(2,200,400,100,100,ImageID(0))
Procedure g()
e=EventType()
g=EventGadget()
If g=1
If e=#PB_EventType_LeftClick
Debug "canvas l"
ElseIf e=#PB_EventType_RightClick
Debug "canvas r"
EndIf
EndIf
If g=0
Debug "button"
EndIf
If g=2
If e=#PB_EventType_LeftClick
Debug "image l"
ElseIf e=#PB_EventType_RightClick
Debug "image r"
EndIf
EndIf
EndProcedure
BindEvent(#PB_Event_Gadget,@g())
second:when I use traditional mouse to click the canvas gagdet , the left click happens while the right click does'nt, but the image gadget seems normal, both click happens.
Is this a bug or I get something wrong?
Win10,64bit,SB 2.0 beta.you can test my code.Thank you