combobox, clearing text field problem

R

ray well

i'm loading a combobox from a database in code, by setting the the DataSouce
to a table, and the DisplayMember to a field.

it loads the first row into the text area of the combobox automatically. i
don't want that.

i used to clear it up by setting ComboBox1.Text="", after loading it.

but i had to put the combobox on a tab page of a tab control.
ComboBox1.Text="" works only if the tab page has the focus when that code
executs! how bizzare. i have to load a few comboboxes living on separate tab
pages, and it would be unisightly to change the focus back and forth while
the user is on a specific page.

how can i

1) either load a combobox in code without setting the text area,

2) or clearing the text area of a combobox on a tab page without the page
having the focus

thanks

ray
 

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