How do you navigate out of a ComboBox on a Windows Mobile Device without a TAB key?

≯℡__Kan透↙ 提交于 2019-12-12 03:19:20

问题


I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, there is no way to move (tab) from the ComboBox control to another control on the same form (say, specifying a product in the ComboBox and then moving to a text field to add a quantity).

I've tried creating an event handler for the ComboBox's KeyPress event and setting the focus to the next control manually whenever the user presses the Right or Left directional key but unfortunately the event handler does not capture those key presses.

Any ideas? I have a strong suspicion that this is being over-engineered and that there exists a better control more suited to what I need to do; I find it a bit inconceivable that tabbing out of a Combo Box control could be that difficult.

Thanks!

EDIT: Apparently I can capture the KeyDown and KeyUp events on the ComboBox, which allows me to set the focus or tab to the next control. Still over-engineered - still looking for ideas!


回答1:


I believe directionals are only captured on KeyDown and KeyUp, not on KeyPress.

Alternatively to using a ComboBox, you could use several RadioButtons if the numer of ListItems is static and relatively small.




回答2:


http://msdn.microsoft.com/en-us/library/bb985500.aspx#GeneralRules provides UI navigation rules.



来源:https://stackoverflow.com/questions/52098/how-do-you-navigate-out-of-a-combobox-on-a-windows-mobile-device-without-a-tab-k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!