InterviewSolution
| 1. |
How Can You Prevent Users Of An Application From Editing The Text In The Combobox Controls In .net 4.0? |
|
Answer» 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; 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; |
|