EVENT_KEYDOWN
BlitzMax Forums/MaxGUI Module/EVENT_KEYDOWN| 
 | ||
| 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
 | 
| 
 | ||
| You need to also include the flag PANEL_ACTIVE. | 
| 
 | ||
| I have added PANEL_ACTIVE  Local MyWindow:TGadget = CreateWindow("My Window",100,100,800,600,PANEL_ACTIVE)
But it dosn't work | 
| 
 | ||
| ...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. | 
| 
 | ||
| Thanks. it works |