User Guide
204 Chapter 6: Components Dictionary
However, since this expression is surrounded by double quotation marks, the value 0-9-^\ is sent
to the restrict interpreter, and the restrict interpreter doesn’t understand this value.
Because you must enter this expression within double quotation marks, you must not only
provide the expression for the restrict interpreter, but you must also escape the expression so that
it will be read correctly by the Actions panel’s built-in interpreter for double quotation marks. To
send the value
0-9\-\^\\ to the restrict interpreter, you must enter the following code:
myCombo.restrict = "0-9\\-\\^\\\\";
The restrict property restricts only user interaction; a script may put any text into the text
field. This property does not synchronize with the Embed Font Outlines check boxes in the
Property inspector.
Example
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
myComboBox.rowCount
Description
Property; the maximum number of rows visible in the drop-down list. 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.