Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Basically I want to be able to set the default value of a combo box.

 

 

 

I have tried...

 

comboBox1.SelectedItem.Text = "Turnip"

 

which does indeed set the value, but it also creates the value within the dropdown box. The problem is that i have already created the combo box values from a table within a database. When i use the above method, i get a duplicate value in the list, which is very untidy.

 

how do i simply place the text within the dropdown? with vb6 i would use..

 

comboBox1 = "Turnip"

 

this would set the default value to "Turnip" but would not create it within the list...

without time nothing ever ends
Posted

This does not work. I have had a look on the web and i think that the findstring is used for a list box.

 

Sorry, i am using a dropdownbox, which does not support the find string.

 

Papa

without time nothing ever ends

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...