Sid:

 

Make a class that extends the CellRenderer class and.

 

 

..ack its quicker to show you the code. See below. This will do it for you.

 

 

package { 

    import fl.controls.listClasses.CellRenderer; 

 

   // make a cell renderer class that allow wrapping of text

 

    public class MultiLineCell extends CellRenderer 

    { 

 

        public function MultiLineCell() 

        {     

            // constructor

            textField.wordWrap = true; 

            textField.multiline = true; 

            textField.autoSize = "left";

        }

                                    

        override protected function drawLayout():void 

        {      

            // allow text to flow according to column width       

            textField.width = this.width;

            super.drawLayout(); 

        } 

    }  // end of class

}  // end of package

 

 

Now just assign it to the required column. Ie:

 

 

myDataGrid.getColumnAt(5).cellRenderer=MultiLineCell;

 

 

Cheers,

Craig Bowman

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to