PDA

Click to See Complete Forum and Search --> : Combobox scroll to item


bflosabre91
Sep 10th, 2009, 08:25 AM
I have a combobox that i want to be able to programmatically scroll down to what the user types. It, of course, works how i would like it to when you highlight the combobox and type using a keyboard, but its a touch screen app so the keyboard is on the screen as buttons. Anyone have any idea how one would go about making a search function on the combobox to allow the user to start typing using an on screen keyboard, and scrolling the combobox to whatever the user is typing. thanks everyone

chris128
Sep 10th, 2009, 04:27 PM
Is this on screen keyboard part of your application? I mean when one of the virtual keyboard buttons is pressed, does the combobox loose focus?

bflosabre91
Sep 11th, 2009, 07:58 AM
yes they are part of my app. the combobox doesnt lose focus when the letters are pressed. i was hoping to put it in the keyboard button click event, put an if combobox.isfocused then do the scrolling. but the scrolling is what i dont know how to do. :D thanks.

chris128
Sep 11th, 2009, 09:49 AM
If they are part of your app then I'm not sure how the combobox can still have focus when you press a button...
Anyway, it would be quite hard (I think) to actually expand the combobox and just highlight an item in it - however it would be quite easy to make it actually select a value from the combobox based on what they typed. Simply set the SelectedItem property to whatever item matches what they have typed.