On 5/5/07, b_alen <[EMAIL PROTECTED]> wrote:
> Thanks a lot Manish. I wasn't even aware of the mx_internal thing. It
>  works great for what I need. However, I do have doubts that this is
> the most elegant solution.

mx_internal is the namespace for internal stuff in the Flex framework.
You can access this stuff but it comes with no guarantee (and can/will
break in future versions).

> I don't know how your subclassed idea could work. Because in the
> subclass itself you are setting the styleSheet to the Text object, I

In the subclass, I'm providing a getter/setter for the styleSheet
property on the protected textField object.

  public function getStyleSheet():StyleSheet {
    return textField.styleSheet;
  }
  // setStyleSheet()

This way you don't have to do any "hacks", accessing mx_internal, etc.

> don't know how is that different from what I tried to do. Also, if I
> subclass the Text, then I have to use it only programatically or can I
> use it in mxml, drag it visualy on stage, etc.?

Well, you can generally subclass any of the framework components and
use them in MXML. See the tutorials for an example of how to do this.
I don't know how it works in Flex Builder/design view.

Reply via email to