ListBox question

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
W

Woody Splawn

I have a listbox on a form with the dropdown style set to drop down list.
It has two items in it. When the form comes to the screen you do not see
any item listed in the dropdown until you click on the down arrow. Idealy
you would see the first item in the list by default without having to click
on the down arrow. How would I do this?
 
Woody Splawn said:
I have a listbox on a form with the dropdown style set to drop down
list. It has two items in it. When the form comes to the screen you
do not see any item listed in the dropdown until you click on the
down arrow. Idealy you would see the first item in the list by
default without having to click on the down arrow. How would I do
this?

combobox1.selectedindex = 0
 
Do me a favor and look in the thread "how do I increment this array" the
last 4 rows I do call your name there (about your treeview).
Cor

I'm sorry Cor. I looked in the message but did not quite understand what
you are getting at.

Thanks for you help here and in other messages.

Woody
 
Hi Woody,

You can set ComboBox.SelectedIndex to 0 in Form_Load, so that the first
item of the list will be shown by default.

If there's anything unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top