|    | |
|  | |
|  | |
|  | |
Flash Player 6.0.79。
Flash MX 2004。
listInstance.labelFunction
属性;指定一个函数用于决定要显示每个项目的哪个字段(或字段组合)。此函数会接收一个参数 item(该参数指示要被呈现的项目),并且必须返回一个表示要显示的文本的字符串。
以下范例让标签显示项目的一些设置了格式的细节:
list.labelFunction = function(item){
  return "The price of product " + item.productID + ", " + item.productName + " is $"
  + item.price;
}
|  | |
|  | |
|  | |
|    | |