In AS3: 

 

Alignment of text for a column in a DataGrid component is handled indirectly
through the TextFormat object which is used in styling text by the
cellRenderer of a DataGridColumn.

 

I often create custom cellRenderers for the DataGrid to handle pictures,
video, radio button groups, comboboxes, etc. and aligning various items used
in and by the cellRenderers is handled in this manner.

 

Also something to note: There are errors in the component architecture in
the way certain calculations were set up between objects. For example, the
HeaderRenderer class of the fl.controls.dataGridClasses has one of these in
the drawLayout function. You can simply derive a new class from the
HeaderRenderer and then do an override on the drawLayout function to make
the necessary adjustments. Without that, your HeaderText isn't going
anywhere, regardless of how you want it aligned.

 

 

Cheers,

 

Craig Bowman

http://www.techyoumedia.com <http://www.techyoumedia.com/> 

 

------------------------------

 

Date: Mon, 12 Oct 2009 12:06:05 -0500

From: Andrew Sinning <[email protected]>

Subject: [Flashcoders] how to set DataGridColumn textAlign

To: Flash Coders <[email protected]>

Message-ID: <[email protected]>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 

I'm trying to set the textAlign of a column in the DataGrid component.  

There are examples of how to do this in Flex, but the required 

methods/properties seem to be missing from fl...DataGridColumn.

 

Thanks!

 

 

------------------------------

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to