List.labelFunction

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

listInstance.labelFunction

Description

Property; specifies a function to be used to decide which field (or field combination) to display of each item. This function receives one parameter, item, which is the item being rendered, and must return a string representing the text to display.

Example

The following example makes the label display some formatted details of the items:

list.labelFunction = function(item){
  return "The price of product " + item.productID + ", " + item.productName + " is $"
  + item.price;
}

See also

List.labelField