EVENT_MOUSEUP ... Canvas

BlitzMax Forums/BlitzMax GUI Programming/EVENT_MOUSEUP ... Canvas

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is this what you wanted?

Local win:TGadget=CreateWindow("MouseTest",5,5,800,600)
Local gad:TGadget=CreatePanel(5,5,790,520,win,PANEL_ACTIVE)

can:TGadget		=	CreateCanvas(5,80,780,400,gad)

popup:TGadget=	CreateMenu("coucou",0,Null)
				CreateMenu("choix 1 ",1,popup)
				CreateMenu("choix 2 ",2,popup)
While True
	WaitEvent
	Select CurrentEvent.ID
		Case EVENT_GADGETPAINT
			SetGraphics CanvasGraphics(can)
			Cls
			DrawText "data:"+String(EventData()),200,200
			Flip 1	
		Case EVENT_WINDOWCLOSE
			End
		Case EVENT_MOUSEDOWN
			RedrawGadget(can)
		Case EVENT_MOUSEUP		
			PopupWindowMenu(win,popup)
	End Select
Wend
End


- David