Hello, and thanks in advance.
I'm obviously new to VB 2005, and I'm making a data entry window that collects 269 data points (0, 1 or 2) in combo boxes. I want to do validation on a keystroke to the combo box but cannot discover how. If it is valid (0, 1, or 2) I want it to jump the the next combo box, if it is invalid, I want a beep, and the box to clear to the default of zero. I'd also like to know how to handle a backspace event so I can highlight the previous combo box.
Thanks so much
I've tested SelectedIndexChanged and it's not the right solution.
Combo Box Events
Page 1 of 13 Replies - 164 Views - Last Post: 21 January 2013 - 06:25 PM
Replies To: Combo Box Events
#2
Re: Combo Box Events
Posted 21 January 2013 - 03:46 PM
Why not turn the 'drop down style' from 'drop down' to 'drop down list'? Then the values are constrained to what you set up at the start... no worry about validating!
#3
Re: Combo Box Events
Posted 21 January 2013 - 06:03 PM
Thanks, I'll look at that. But how come I can't find a way to trigger an event when the text in the combobox changes?
Thanks again
Thanks again
#4
Re: Combo Box Events
Posted 21 January 2013 - 06:25 PM
It's all about the firing of the events.. for kicks you should slap a few on the control and have it print out to the debug window.. see what fires when.
If you are typing that doesn't change an index until, typically, the user leaves the control or selects something from the drop down.. if you were looking for a 'text change' then use that event.
OnTextChanged
http://msdn.microsof...s.combobox.aspx
but.. all that aside what you told me sounds like you need to lock down the control's input and just use the predefined values you give it.
If you are typing that doesn't change an index until, typically, the user leaves the control or selects something from the drop down.. if you were looking for a 'text change' then use that event.
OnTextChanged
http://msdn.microsof...s.combobox.aspx
but.. all that aside what you told me sounds like you need to lock down the control's input and just use the predefined values you give it.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|