MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 154

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Example
This example sizes an image in the cell to fit within the bounds specified by the list:
function setSize(w:Number, h:Number):Void
{
image._width = w-2;
image._height = h-2;
image._x = image._y = 1;
}
This example is in a cell renderer class that extends UIComponent (which extends UIObject), so
you must implement
// By extending UIComponent, you get setSize for free;
// however, UIComponent expects you to implement size().
// Assume __width and __height are set for you now.
// You're going to expand the cell to fit the whole rowHeight.
function size():Void
{
// __width and __height are the underlying variables
// of the getters/setters .width and .height.
var c = multiLineLabel;
c._width = __width;
c._height = __height;
}
CellRenderer.setValue()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
componentInstance.setValue(suggested, item, selected)
Parameters
A value to be used for the cell renderer's text, if any is needed.
suggested
An object that is the entire item to be rendered. The cell renderer can use properties of
item
this object for rendering.
A string with the following possible values:
selected
.
"selected"
Returns
Nothing.
154
Chapter 6: Components Dictionary
instead of
size()
setSize()
, as follows:
,
"normal"
"highlighted"
, and

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents