Check out the examples on my blog
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.ht
ml

 

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of tsiesser
Sent: Friday, April 13, 2007 1:49 PM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Italics in datagrid cell

 

Hi - I'm trying to display italics in a datagrid cell based on certain
row criteria. I've created a custom itemRenderer in AS3 that derives
from UIComponent and that contains a UITextField as a child. (This
might seem a little over-complex for what I'm describing, but I have
other use for doing it this way... :-))

I override commitProperties and do the following:

override protected function commitProperties():void
{
super.commitProperties();

textField.text = ... // get text value from data (works okay)

if (data && data is MyClass && MyClass(data).notAvailable)
{
textField.textColor = textField.getStyle("disabledColor");
textField.setStyle("fontStyle", "italic");
}
else
{
textField.textColor = textField.getStyle("color");
textField.setStyle("fontStyle", "normal");
}
}

The result is that I *do* get the disabled color when appropriate, but
I *don't* get the italics.

Does anyone have any idea what's going on? Thanks in advance for your
help!

 

Reply via email to