ComboBox: How can I limit user to list items?

A

A.M-SG

Hi,

How can I limit user to only available items in the combobox list?
By default user can choose one of the list items and also type anything
she/he wants!

Thank you,
Alan
 
N

Neil Ni

Hi Alan

Please set the ComboBox.DropDownStyle attribute of ComboBox.

Example:

private void InitializeComponent()
{
...
this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
...

}


Thanks & Regards,

Neil Ni
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=====================================================
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.

This and other support options are available here:

BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469

Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/

If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/default.aspx?scid=/international.aspx.
=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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