Cellrenderer.getpreferredheight() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following code tells the cell the name of the data field that it is rendering. For example, if
the name of the data field currently being rendered by the cell is
, the variable
is
"Price"
p
now equal to
:
"Price"
var p = getDataLabel();

CellRenderer.getPreferredHeight()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
componentInstance.getPreferredHeight()
Parameters
None.
Returns
The correct height for the cell.
Description
Method; returns the preferred height of a cell. This is especially important for getting the
right height of text within the cell. If you set this value higher than the
property of
rowHeight
the component, cells will bleed above and below the rows.
This method is not provided by the List class; you must implement it. It tells the rows of the
list how to center the cell and how to adjust the cell's height if necessary. If necessary, you can
return a constant (for example, 22), or you can measure and return the height of the contents.
You can also return
, which is the height of the row.
owner.height
Example
This example returns the value 20, which indicates that the cell should be 20 pixels high:
function getPreferredHeight(Void) :Number
{
return 20;
}
120
CellRenderer API

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents