I m trying to create a datagrid on flash cs3 with AS3. I have managed to make the cells multiline and wordwrap. But I couldnt make the headers of the columns multiline and wordwrap. Please help me.
[FONT=“Arial Black”]Here is my .as file code:[/FONT]
package {
import fl.controls.listClasses.CellRenderer;
public function MultiLineCell()
{
textField.wordWrap = true;
textField.autoSize = "left";
}
override protected function drawLayout():void {
textField.width = this.width;
super.drawLayout();
}
}
}
[FONT=“Arial Black”]Here is my AS3 code in my main .fla file[/FONT]
import fl.data.DataProvider;
import fl.controls.dataGridClasses.DataGridColumn;
aDg.rowHeight=50;
var model_v:DataGridColumn = new DataGridColumn("model");
var maksyuk_v:DataGridColumn = new DataGridColumn("maksyuk");
model_v.headerText = "Model";
model_v.cellRenderer=MultiLineCell;
maksyuk_v.headerText = "Maks Yuk c:222 f*2";
maksyuk_v.width = 100;
maksyuk_v.cellRenderer=MultiLineCell;
aDg.addColumn(model_v);
aDg.addColumn(maksyuk_v);
aDg.addItem({model:"GZ5",maksyuk:"5000 3000 900000 9690000"});
[FONT=“Arial Black”]Here is a screenshot of what i m trying to do:[/FONT]