Enter key and list box

BlitzMax Forums/MaxGUI Module/Enter key and list box

JoshK(Posted 2010) [#1]
Shouldn't pressing Enter emit a GADGET_ACTION event when a list box gadget is active?


ima747(Posted 2010) [#2]
GADGET_ACTION is for double clicks, you might want to handle an enter differently... I think it should emit something though... unless I missed it I think the way to handle this would be to trap the keyhit event and also track if the listbox has focus... which is kinda roundabout... maybe a gadget_action with event data to indicate it was a key as opposed to a double click...


JoshK(Posted 2010) [#3]
The treeview gadget uses the enter key to generate GADGETACTION events. I think the listbox should work the same.

I got around this by using an offscreen OK button in the same panel.