Skip to main content
A newer version of this page is available. .

TcxDBComboBox Class

Represents a data-aware combo box editor.

Declaration

TcxDBComboBox = class(
    TcxCustomComboBox
)

Remarks

A data-aware combo box editor allows you to edit data from the associated field either by selecting the required value from the dropdown list or by typing text in the edit box part of your control. The image below demonstrates a combo box editor painted in the native style:

You can use the TcxDBMRUEdit control for the same purpose. However, an MRU editor stores values entered by a user into the associated dropdown list at runtime.

The TcxDBComboBox control’s functionality is similar to TcxComboBox, but it allows editing dataset values. To connect a data-aware control to a dataset, it is necessary to set the DataSource and DataField properties of the DataBinding object.

Use the Items attribute of the Properties object to populate the list of strings displayed within the dropdown window. When a user enters text into an editor, that text can be automatically completed to match a value from the editor dropdown.

A combo box editor can be used to display values from its dropdown without inputting text into the edit region of a control. Set the DropDownListStyle member of the Properties object to the IsFixedList value to implement this type of combo box behavior. A user can activate the popup by clicking the dropdown button or by pressing the Up Arrow and Down Arrow keys combined with the Alt key or by pressing the F4 key.

The Properties object provides various settings specific to combo box editors: text alignment, the type of dropdown list, the mask to enter values, the immediate dropdown feature and many others.

Use the Style, StyleDisabled, StyleFocused and StyleHot members to specify the look & feel of an editor and its dropdown window. Working with styles is discussed in TcxCustomEditStyle topic.

See Also