5 Replies Latest reply on May 2, 2008 8:40 AM by alexanderdehaas

    HTML in Panel

    WestSide Level 1
      Hi,

      How do you make the HTML align correctly in a panel. I have the following, the html seems to work but its weird, it treats the line breaks in the code literally, it just does not look good. How do most folks write text in a <mx:Panel that wraps nicely and does require it to be all on one long line. I would like my text to start at the left of the panel naturally. The below code seems to just put the text wherever it wants to. Any help appreciated

      <mx:Panel title=" My Panel" width="261" height="145" layout="absolute" dropShadowEnabled="true">
      <mx:Text>
      <mx:htmlText>
      <![CDATA[
      This is <font color="#FF0000">HTML text</font>
      in a <b>Text component</b>.
      Using the <u>htmlText attribute</u> of
      the <font color="#008800">Text component</font>
      you can use basic HTML markup.
      ]]>

      </mx:htmlText>
      </mx:Text>
      </mx:Panel>

      Thanks,
      -Westside