Simple question...

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I have just started windows development, and have a really
simple question:

I want to create a 'dropdown' control, with a down arrow
to the right, which when clicked, causes the items in the
control to 'drop down', in a list, which the user can
scroll through. We've all seen them.

I added a ListBox to my form, but when rendered, it is one
item high... there is no 'dropdown', the user scrolls
through the items one at a time.

Is the ListBox the right control too use?
Am I missing some display property of the ListBox?

Hope this is clear.

TIA,

Sean.
 
The control you are thinking of is a ComboBox, which is just a specialized
version of listbox that gives you the dropdown style.

HTH

Bill
 
Thanks Bill.

The ComboBox allows the user to edit (type over) the value.

Can I stop this?

I want the user to select from the list of items, not supply a new one.
 
Yes you can stop that.. change the DropDownStyle property
from DropDown (Which is default) to DropDownList. That
will stop the user from typing..
hope that helps

kumar
 

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