2 Replies Latest reply on Jul 10, 2006 7:40 AM by James Edmunds

    Styling within TextArea

    James Edmunds Level 1
      I have been doing the lessons in the tutorials that came with Flex Builder 2, and have fiddled with the BlogReader sample to create a version of the BlogReader that reads the RSS of my own blog:
      http://jamesedmunds.com/Flex/BlogReader.cfm

      My question has to do with styling within the TextArea below the grid, where individual postings are displayed. How would I style this, so that, for instance, the anchors (links to http:// addresses, in this case) showed in blue (and even changed on hover)? Is this possible?

      Thanks in advance,

      James

        • 1. Re: Styling within TextArea
          inlineblue Level 1
          The TextArea component supports a subset of HTML. It's good enough for colour and font changes. Take a look at the htmlText property.
          • 2. Re: Styling within TextArea
            James Edmunds Level 1
            I can get the textArea to take the styles passed in through a stylesheet, but not take the <a> styles.

            Here is what is in my stylesheet:

            A:link {color:#333300;
            text-decoration:underline;}
            A:active {color:#333300;
            text-decoration:underline;}
            A:visited {color:#333300;
            text-decoration:underline;}
            A:hover {color:#c00000;
            text-decoration:underline;}

            TextArea
            {font-family:Georgia;
            font-size:14px;
            color:#000000;
            }

            The text in the textArea displays in 14px Georgia as indicated, but the <a> tags do not take the propoerties at all... the only indication that they are links is that the cursor changes to the pointing finger when hovered over them.

            Thanks in advance for any help,

            James