1 Answers
The ComboBox class contains the DropDownStyle property, which is used to define the display style of the items in the ComboBox control. The DropDownStyle property accepts a value from the ComboBoxStyle enumeration, which contains three members to define the styles for the items: Simple, DropDownList, and DropDown. The DropDownList value of the ComboBoxStyle enumeration is selected to set a ComboBox control as non- editable by users, as shown in the following code snippets: Code for VB: ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList Code for C#: ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList;