MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 118

Components language reference
Table of Contents

Advertisement

myDP.addItem({firstName:"Kevin", lastName:"Wade", note:aLongString,
item:103});
myDP.addItem({firstName:"Kimberly", lastName:"Dietrich",
note:aLongString, item:104});
myDP.addItem({firstName:"AJ", lastName:"Bilow", note:aLongString,
item:105});
myDP.addItem({firstName:"Chuck", lastName:"Yushan", note:aLongString,
item:106});
myDP.addItem({firstName:"John", lastName:"Roo", note:aLongString,
item:107});
/* Assign the data provider to the DataGrid to populate it. Note: This
has to be done before applying the cellRenderers. */
myGrid_dg.dataProvider = myDP;
/* Set some basic grid properties. Note: The data grid's row height
should reflect the number of lines you expect to show in the
MultiLineCell cell renderer. The cell renderer will size to the row
height. This should be about 40 for 2 lines or 60 for 3 lines at
default text size.*/
myGrid_dg.setSize(430,200);
myGrid_dg.move(40,40);
myGrid_dg.rowHeight = 40; // Allows for 2 lines of text at default text
size.
myGrid_dg.getColumnAt(0).width = 70;
myGrid_dg.getColumnAt(1).width = 70;
myGrid_dg.getColumnAt(2).width = 220;
myGrid_dg.resizableColumns = true;
myGrid_dg.vScrollPolicy = "auto";
myGrid_dg.setStyle("backgroundColor", 0xD5D5FF);
// Assign cellRenderers.
myGrid_dg.getColumnAt(2).cellRenderer = "MultiLineCell";
12.
Save the Flash document, and select Control > Test Movie.
A data grid appears. The third column of the data grid contains a multiple line cell.
The completed MultiLineCell cell renderer example.
116
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?

This manual is also suitable for:

Flash 8

Table of Contents