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