User Guide
List component 467
Description
Property; specifies the name of a field to be used as an icon identifier. If the field has a value of
undefined, the default icon specified by the defaultIcon style is used. If the defaultIcon style
is
undefined, no icon is used.
Example
The following example sets the iconField property to the icon property of each item:
list.iconField = "icon"
See also
List.iconFunction
List.iconFunction
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.iconFunction
Description
Property; specifies a function that determines which icon each row will use to display its item.
This function receives a parameter,
item, which is the item being rendered, and must return a
string representing the icon’s symbol identifier.
Example
The following example adds icons that indicate whether a file is an image or a text document. If
the
data.fileExtension field contains a value of "jpg" or "gif", the icon used will be
"pictureIcon", and so on.
list.iconFunction = function(item){
var type = item.data.fileExtension;
if (type=="jpg" || type=="gif") {
return "pictureIcon";
} else if (type=="doc" || type=="txt") {
return "docIcon";
}
}