•
Lists aren't tables.
For example, DataGrid components, which extend the List class, are intended to provide an
interface for many records. They're not designed to display complete information; they're
designed to display enough information so that users can drill down to see more. The message
view in Microsoft Outlook is a prime example. You don't read the entire e-mail in the grid; the
mail would be difficult to read and the client would perform terribly. Outlook displays enough
information so that a user can drill into the post to see the details.
List parameters
You can set the following authoring parameters for each List component instance in the Property
inspector or in the Component inspector:
data
is an array of values that populate the data of the list. The default value is
array). There is no equivalent runtime property.
labels
is an array of text values that populate the label values of the list. The default value is
empty array). There is no equivalent runtime property.
multipleSelection
or not (
). The default value is
false
rowHeight
indicates the height, in pixels, of each row. The default value is 20. Setting a font does
not change the height of a row.
You can write ActionScript to set additional options for List instances using its methods,
properties, and events. For more information, see
Creating an application with the List component
The following procedure explains how to add a List component to an application while
authoring. In this example, the list is a sample with three items.
To add a simple List component to an application:
Drag a List component from the Components panel to the Stage.
1.
Select the list and select Modify > Transform to resize it to fit your application.
2.
In the Property inspector, do the following:
3.
Enter the instance name myList.
Enter Item1, Item2, and Item3 for the labels parameter.
Enter item1.html, item2.html, item3.html for the data parameter.
Select Control > Test Movie to see the list with its items.
4.
You could use the data property values in your application to open HTML files.
To populate a List instance with a data provider:
Drag a List component from the Components panel to the Stage.
1.
Select the list and select Modify > Transform to resize it to fit your application.
2.
In the Actions panel, enter the instance name myList.
3.
452
Chapter 6: Components Dictionary
is a Boolean value that indicates whether you can select multiple values (
false
.
"List class" on page
(an empty
[]
[]
true
456.
(an
)
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?