Screen refresh issue

  • Thread starter Thread starter RSH
  • Start date Start date
R

RSH

Hi,

I have a Windows form that has several ComboBoxes on it. I would like to be
able to clear the existing values when the user clicks on the Clear button,
and then I need some of the Combos to be disabled. The problem I am having
is that all of the Combo boxes retain their last selected value on screen.

cmbAccessTable.Items.Clear();

cmbAccessTable.Enabled = false;

cmbSQLDatabase.Items.Clear();

cmbSQLDatabase.Enabled = false;

cmbSQLTable.Items.Clear();

cmbSQLTable.Enabled = false;



How do I clear them?????



Thanks,

Ron
 
RSH said:
Hi,

I have a Windows form that has several ComboBoxes on it. I would like to be
able to clear the existing values when the user clicks on the Clear button,
and then I need some of the Combos to be disabled. The problem I am having
is that all of the Combo boxes retain their last selected value on screen.

cmbAccessTable.Items.Clear();

cmbAccessTable.Enabled = false;

cmbSQLDatabase.Items.Clear();

cmbSQLDatabase.Enabled = false;

cmbSQLTable.Items.Clear();

cmbSQLTable.Enabled = false;



How do I clear them?????



Thanks,

Ron

cmbAccessTable.Items.Clear();
cmbAccessTable.SelectedText = "";
cmbAccessTable.Enabled = false;

I think that's the property you have to clear. I could be wrong on the
name, but I know it has "Text" in it.

Chris
 
Back
Top