EVENT_KEYDOWN

BlitzMax Forums/MaxGUI Module/EVENT_KEYDOWN

Brainbox(Posted 2008) [#1]
Can anybody tell me why this dosn't work?




Import MaxGUI.Win32MaxGUIEx


Local MyWindow:TGadget = CreateWindow("My Window",100,100,800,600)
Local MyPanel:TGadget = CreatePanel(600,0,180,500,MyWindow,PANEL_GROUP,"MyPanel")
SetPanelColor MyPanel, 192, 192, 192

Repeat
	WaitEvent()
	Select EventID()
		Case EVENT_WINDOWCLOSE
		End
		Case EVENT_KEYDOWN
			Select EventData ()
		         Case KEY_ESCAPE
		          End
		         Case KEY_A
		          End
		      End Select
	End Select
Forever



Brucey(Posted 2008) [#2]
You need to also include the flag PANEL_ACTIVE.


Brainbox(Posted 2008) [#3]
I have added PANEL_ACTIVE

 Local MyWindow:TGadget = CreateWindow("My Window",100,100,800,600,PANEL_ACTIVE)



But it dosn't work


Brucey(Posted 2008) [#4]
...to the Panel :
Local MyPanel:TGadget = CreatePanel(600,0,180,500,MyWindow,PANEL_GROUP | PANEL_ACTIVE,"MyPanel")


You may also have to activate the panel first, before it starts accepting input.


Brainbox(Posted 2008) [#5]
Thanks. it works