|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ComboBox: How can I limit user to list items?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 Set the DropDownStyle property to ComboBoxStyle.DropDownList.
-- Show quoteHide quoteTim Wilson ..NET Compact Framework MVP "A.M-SG" <alanalan@newsgroup.nospam> wrote in message news:ubYHccSJGHA.2628@TK2MSFTNGP15.phx.gbl... > 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 > > 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=%2finternational.aspx. ===================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
Other interesting topics
Recommendations for graphical application
DoubleClick Event Won't Fire Databinding between two forms in .NET 2.0 Recommendations for graphical application Project Data Source Using Derived Interface multiple forms/common menu structure 'DisplayMember' is not a member of 'System.Windows.Forms.ListView'. Odd behavior with .NET 2.0 winforms code clean up Generic windows error message |
|||||||||||||||||||||||