User Guide
196 ComboBox component
In the following example, the first line of code limits the text field to uppercase letters,
numbers, and spaces. The second line of code allows all characters except lowercase letters.
my_combo.restrict = "A-Z 0-9";
my_combo.restrict = "^a-z";
The following code allows a user to enter the characters “0 1 2 3 4 5 6 7 8 9 - ^ \” in the
instance
myCombo. You must use a double backslash to escape the characters -, ^, and \. The
first
\ escapes the double quotation marks, and the second \ tells the interpreter that the next
character should not be treated as a special character.
myCombo.restrict = "0-9\\-\\^\\\\";
ComboBox.rowCount
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
comboBoxInstance.rowCount
Description
Property; the maximum number of rows visible in the drop-down list before the combo box
inserts a scroll bar. The default value is 5.
If the number of items in the drop-down list is greater than the
rowCount property, the list
resizes and a scroll bar is displayed if necessary. If the drop-down list contains fewer items than
the
rowCount property, it resizes to the number of items in the list.
This behavior differs from the List component, which always shows the number of rows
specified by its
rowCount property, even if some empty space is shown.
If the value is negative or fractional, the behavior is undefined.