ComboBox - set focus?

E

Ed Stewart

Hello. I'm creating an application that requires user input into a ComboBox,
and I'd like to have the cursor appear in this emtpy ComboBox when the
application starts. I had a plain TextBox, and the cursor started there
automatically; to implement a history feature, I've moved to a ComboBox, but
now the user needs to click on it before typing.

How do I set focus on this item? I've tried adding a null string and calling
comboBox.Focus() to no avail. I read somewhere the trick is to set the focus
to the editable text box contained within the ComboBox, but I haven't been
able to figure out how to do that.

Thanks,
-ed
 
M

Mohamed Enein

How about setting the TabIndex of your combobox to zero?
--------------------
 

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