Skip to main content
Inspiring
October 25, 2006
Answered

ComboBox help

  • October 25, 2006
  • 1 reply
  • 365 views
I have 3 check boxes and a combobox. By default, if someone chooses an item from the combobox without one of the 3 checkboxes being selected, it throws an error and tells them to first pick a checkbox, then to repick from the combo box. That works fine as long as they don't pick the same item from the combobox. What I would like is a way to reset the combobox to the default value if I throw the error (that way if the user immediately goes back and picks the same option under the combo box (without having to switch to another item first) then it will work).

Thanks in advance.
This topic has been closed for replies.
Correct answer harms239b
I appreciate your help. Unfortunately I couldn't get that to work, but I am still open for suggestions.
WOOOOHOOOOO! Figured it out.

Here is the answer

myComboBox.selectedIndex = 0

1 reply

harms239bAuthor
Inspiring
October 25, 2006
Bump
October 26, 2006
I'm not happy with my solution to a similar problem so I hope some-one has a better one!

The only way I could get the value set in a ComboBox was first to change the editable property to true and the set the text.

cbEvents.editable = true;
cbEvents.text = "Some value";

Editable ComboBox is not a good thing since the whole point is to control input, and now the user can go ahead and screw it up.
harms239bAuthor
Inspiring
October 26, 2006
I appreciate your help. Unfortunately I couldn't get that to work, but I am still open for suggestions.