471,337 Members | 902 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Screen refresh issue

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
Dec 22 '05 #1
1 970
RSH wrote:
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
Dec 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Logger | last post: by
5 posts views Thread by Andrew Chanter | last post: by
3 posts views Thread by serge anton | last post: by
3 posts views Thread by redneon | last post: by
reply views Thread by Casey Bralla | last post: by
reply views Thread by Casey Bralla | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.