List.labelField

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.labelField

Description

Property; specifies a field in each item to be used as display text. This property takes the value of the field and uses it as the label. The default value is "label".

Example

The following example sets the labelField property to be the "name" field of each item. "Nina" would display as the label for the item added in the second line of code:

var my_list:mx.controls.List;

my_list.labelField = "name";
my_list.addItem({name: "Nina", age: 25});

See also

List.labelFunction