views:

388

answers:

2

Hi All,

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  A: 

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.

Bill Ayakatubby
A: 

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

Vijay Arunraj