Only one button works..?

BlitzMax Forums/BlitzMax Beginners Area/Only one button works..?

You defined the buttons more or less one on top of the other. I made them just a bit smaller!

SuperStrict 

Global Style:Int = WINDOW_TITLEBAR|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_STATUS
Global clickedFirst:Int = 0 
Global myWindow:TGadget=CreateWindow("MyWindow",500,500,800,600,Null,Style)
Global secondButton:TGadget=CreateButton("No, click ME!",150,200,400,50,myWindow)
Global firstButton:TGadget=CreateButton("Click ME!",150,150,400,50,myWindow)
Repeat
WaitEvent()
	SetStatusText myWindow, "MyWindow Created Successfully... Size (width/height): " + ClientWidth(myWindow)+ ", "+ClientHeight(myWindow)+ ". Style: "+Style 
	Select EventID() 
		Case EVENT_WINDOWCLOSE
			End 
		Case EVENT_GADGETACTION
			Select EventSource()
				Case secondButton
					SetGadgetText(secondButton,"You clicked ME!") 
				Case firstButton
					SetGadgetText(firstButton,"You clicked on ME!") 
			End Select 
		End Select 
Forever 
End