package grid{ import fl.controls.listClasses.CellRenderer; import fl.controls.listClasses.ICellRenderer; import flash.text.TextFormat; import flash.text.TextFormatAlign; public class CenterAlignCell extends CellRenderer implements ICellRenderer { private var tf:TextFormat; public function CenterAlignCell():void { tf = new TextFormat(); tf.align = TextFormatAlign.CENTER; } override protected function drawLayout():void { textField.width = this.width; textField.setTextFormat(tf); super.drawLayout(); } } }