if (myCheck.enabled!=itm.enabled){
myCheck.enabled = itm.enabled;
}
}
If you want to enable the check box on the second row, you communicate through the data
provider. Any change to the data provider (when made through a DataProvider method such as
DataProvider.editField()
would be written in the Flash application, either on a frame, on an object, or in another class file
(but not in the cell renderer class file):
// calls setValue() again
myGrid.editField(1, "enabled", true);
The following example loads an image in a loader component within the cell, depending on the
value passed:
function setValue(suggested, item, selected) : Void
{
// clear the loader
loader.contentPath = undefined;
// the list has URLs for different images in its data provider
if (suggested!=undefined)
loader.contentPath = suggested;
}
The following example is from a multiline text cell renderer:
function setValue(suggested:String, item:Object, selected:Boolean):Void
{
// adds the text to the label
multiLineLabel.text = suggested;
}
156
Chapter 6: Components Dictionary
) calls
to refresh the display of the grid. This code
setValue()
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers