The WinForms ComboBox control is used to display data in a drop-down combo box. It is a drop down edit, which displays a drop down list of items to choose from.
The ComboBox item’s content can be any widget, so it’s easy to create whatever combo box item you wish. For example, to create a combo box item that has image and text just put the image and the text in a pair box and assign it as content of the combo box item.
The ComboBox provides the following properties:
- Drop Down Style - determines the drop down style of the combo box. Can be one of the following:
- Drop Down - the list of items is displayed by clicking the down arrow and the text portion is editable. This means that the user can enter a new value and is not limited to selecting an existing value from the list.
- Drop Down List - the list is displayed by clicking the down arrow and the text portion is not editable. This means that the user cannot enter a new value. Only values already in the list can be selected. This is the default combo box style.
- Max Drop Down Height - determines the height of the combo box’s popup window.
- Items - the items collection of the combo box.
- Selected Index - the index of the currently selected combo box item.
- Selected Item - points to the currently selected combo box item. When this property changes, the SelectedIndex property is automatically updated.
NOV ComboBox widget is styled with CSS. NOV initially comes with the following themes: Windows 8, Windows 7, Windows XP Blue, Windows Classic (with all color scheme variations) and Mac Lion.