|
|
Subject:
Tab Key selecting first item in comboBox
Category: Computers > Programming Asked by: softcom-ga List Price: $10.00 |
Posted:
02 Jun 2003 09:34 PDT
Expires: 02 Jul 2003 09:34 PDT Question ID: 211984 |
I've written a program in VB.Net that has a number of different controls on a form. The tab order has been setup to fit the end users needs, but the problem occurs when the user uses the tab key to go from control to control. Whenever the user tabs to a combobox, if the nothing is selected in the combobox, then the first item on the list is selected, This has only happened since the user changed from Win 98 to Win 2000. In Win 98 there was no problem at all. I run Win 2000 and am unable to duplicate the problem, which leads me to believe that it might be a Win 2000 setting. I added a textbox to the program to record the events for the combobox. On my machine I get the following events when the I tab to the combobox. Enter LostFocus GotFocus On the users machine I get: Enter LostFocus GotFocus Keyup I haven't check all the events, but for some reason it's recording the tab keyup event. Any ideas/solutions? Thanks |
|
There is no answer at this time. |
|
Subject:
Re: Tab Key selecting first item in comboBox
From: snipr-ga on 02 Jun 2003 15:24 PDT |
I too have Win2k and I was also unable to duplicate the problem you're experiencing. One possibility might be to catch the KeyDown event of the combobox and ignore it if it's the tab key. I realize that the textbox does not print the KeyDown event, but it's still something to try. Another semi-hackaround would be to set the KeyPreview property of the parent form to True so that now the form gets to preview all keys being pressed. Now, on the KeyDown/KeyUp event of the form you can check to see if you're on the combobox and respond accordingly by simulating a real tab like you want. Again, these are all just possibilities, I haven't actually tested them as working solutions. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |