1 Reply Latest reply on Sep 2, 2006 6:07 PM by yaroze

    Bug? TextField stylesheet not populating styles

    yaroze
      Hi. I've been doing some work with the Textfield class to do some custom HTML parsing.
      The problem that I run into is that when I do

      text.htmlText = "<span class='style'><P>HTml text</P></span>";

      The renderer for flex disregards the style and implements its own
      html formatting, thus defeating the point of setting the htmlText variable.

      So, essentially none of my styles are even visible to htmlText and they
      don't show up... it's the oddest thing.

      This is a major bug if there is no other workaround. You should be able
      to style htmlText and import your own styles and have the htmltext
      actually use them. Any ideas on this?

      Best,

      Austin

        • 1. Bug? TextField stylesheet not populating styles
          yaroze Level 1
          This was sorted out. see http://rantworld.blogs.com/flashlit/2006/08/styling_flex_te.html

          The only problem now is that the embedded stylesheet at runtime is not showing up in the html text. Does this mean
          I have to use urlLoader to load in a stylesheet and then create something that makes a StyleSheet object? Im curious
          if anyone else had to do this.

          I guess the new question becomes -- how do apply a stylesheet to a textarea, by 1 it not generating a runtime error with validateNow() and 2 -- how do you make it actually apply the global stylesheet for the program. Right now you have to physically set the stylesheet property to a created StyleSheet object - very ghetto. Can't we just load in a stylesheet object and then apply that? The global stylesheet has no id tag so there is no reference to apply to the text field.