ComboBox - many on form, all get text highlighted?

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

I have a windows form, many combo boxes, i create items and add to the items
collection in code. When viewing form, many combos have their text
selected, highlighted. Is there a preferred way to pre-select the first
item in a combo without highlighting text all the time? I am using
Combo.SelectedIndex = 0; after populating the items collection.

Thanks in advance!

Derrick
 
you can use DropDownStyle -> DropDownList

but if you need DropDownStyle -> DropDown use:
cboL.SelectionStart
cboL.SelectionLength

MajorTom
 
That did it, thanks!!

Derrick

MajorTom said:
you can use DropDownStyle -> DropDownList

but if you need DropDownStyle -> DropDown use:
cboL.SelectionStart
cboL.SelectionLength

MajorTom
 

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

Back
Top