cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Praveen_Durbha
Level 6

Replacing ISComboBox with ISTextField

I am trying to replace an ISComboBox with an ISTextField based on user selection.


Here is my code:

ISComboBox state = arg0.getISContainer().getComboBoxControl("insite2_state_list");

state.setVisible(false) //Hiding the state combo box

//Creating a new ISTextField and setting its properites.
ISTextField stateField = (ISTextField)(new SwingTextField()); stateField.setSize(new Dimension(157,12));
stateField.setVisible(true);//Show ISTextField instead of the combo box.

This doesn't work..anybody know how to do this?

Thanks
Labels (1)
0 Kudos
(2) Replies
jweber
Level 6

You probably could do it this way, but not with that code. The easiest approach would be to have both controls created on the form from the beginning and then you could disabled/hide, enable/show them based on user selection. You may need call setLocation to move the newly shown field around...
0 Kudos
Praveen_Durbha
Level 6

Great!..I got it to work ..

Thanks again
0 Kudos