5 Replies Latest reply on Nov 4, 2008 9:39 AM by John_Obama

    htmlText of Text

    John_Obama
      Hi.. I have a class which extends the Text. When I added htmlText and select the text added on display, i am kinda getting an extra line at the end. I did checked it (in debug mode) that the htmlText does not have that. But it only happens when I selected it on the screen.

      thanks
        • 1. Re: htmlText of Text
          m_hartnett Level 3
          Flex does not support the full set of HTML tags. There is most likely some character there that is not supported by flex and is not able to be displayed however it is still there and takes up space.

          If you could paste the htmlText it would help.
          • 2. Re: htmlText of Text
            wyattbiker Level 1
            Extra line is a CR/LF. As far as HTML goes that is white space.
            • 3. Re: htmlText of Text
              John_Obama Level 1
              This is the tag
              <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT SIZE="11" LETTERSPACING="0" KERNING="0" FACE="Verdana" COLOR="#333333">sdjaflksafjlskfjlsad</FONT></P></TEXTFORMAT>

              It only happens when the text is long so that it needs to be wrapped to the next line. If the text can fit in in a single line, it has no extra line when I select it.

              Thanks
              • 4. Re: htmlText of Text
                m_hartnett Level 3
                Looking at the text property of a text object that meets the word wrap definition from your first post this is what the text attribute says. The \r is a return sequence.

                The Celtics and Patriots and Red Sox are from boston.\r

                If you give your text object a specific height then the return is not there. Looks like that is how Flex does it.
                • 5. Re: htmlText of Text
                  John_Obama Level 1
                  I think it is because of the LEADING of the TEXTFORMAT. If I set it to be "0" it does not have an extra line. How can I do that so that I don't have an extra line but at the same time I want some spacing between the lines.