howto select text in a combobox

O

ORC

I have a combobox with an unknown list of items except of one item which I
want to be selected at startup. I know that I can select an index like this:
comboBox1.SelectedIndex = 1;
but I don't know the index of the item I want to be selected. So I'm looking
for something like this:
comboBox1.Selected??????? = "Bob";

This way the program will start with a comboBox showing the text "Bob".

Any idea how to do this?

Thanks
Ole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top