| Flex 2 Developer's Guide >
Building User Interfaces for Flex Applications > Using Data-Driven Controls > ComboBox control |
|||
The ComboBox control is a drop-down list from which the user can select a single value. Its functionality it is very similar to that of the SELECT form element in HTML.
For complete reference information, see ComboBox in Adobe Flex 2 Language Reference.
The following image shows a ComboBox control:
In its editable state, the user can type text directly into the top of the list, or select one of the preset values from the list. In its noneditable state, as the user types a letter, the drop-down list opens and scrolls to the value that most closely matches the one being entered; matching is only performed on the first letter that the user types.
If the drop-down list hits the lower boundary of the application, it opens upward. If a list item is too long to fit in the horizontal display area, it is truncated to fit. If there are too many items to display in the drop-down list, a vertical scroll bar appears.
The ComboBox control has the following default sizing properties:
|
Property |
Default value |
|---|---|
|
Default size |
Wide enough to accommodate the longest entry in the drop-down list in the display area of the main control, plus the drop-down button. When the drop-down list is not visible, the default height is based on the label text size. The default drop-down list height is five rows, or the number of entries in the drop-down list, whichever is smaller. The default height of each entry in the drop-down list is 22 pixels. |
|
Minimum size |
0 |
|
Maximum size |
5000 by 5000. |
dropdownWidth
|
The width of the ComboBox control. |
rowCount
|
5 |
Flex 2.01