PDA

View Full Version : Resetting Comboboxes



Danneman
July 16th, 2003, 05:56 PM
How do you reset combo-boxes?

I have this form with combo-boxes and input textfields, and I want a button that can reset the form.

The input textboxes are easy:
TextBox1.text = "";

But the combo-boxes...well, I dunno

claudio
July 16th, 2003, 06:42 PM
Place this code on the button:on (press) {
combo_box_instancename.removeAll();
}

Danneman
July 16th, 2003, 07:44 PM
That makes the combo-boxes stop working. I just want to reset the values to the first value in the list.

kode
July 16th, 2003, 08:12 PM
Not sure... I've never used components. :P
FComboBox.setSelectedIndex(0);
??

Danneman
July 16th, 2003, 08:34 PM
Yup, it worked fine :) Thanx

kode
July 16th, 2003, 08:35 PM
:P

You're welcome. =)