1 Reply Latest reply on Sep 5, 2009 7:14 AM by ShardulSingh

    font tag problem in flex

    peddireddyss

      Hello guys,

       

       

                             I'm faceing  problem with lable,when i am click on the button hello is same color and ' * ' in red color.In this case am unable get the exact data.

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
          <mx:Label id="l" text="show"/>
          <mx:Button label="change" click="clik()"/>
          <mx:Script>
              <![CDATA[
                  private function clik():void
                  {
                      l.htmlText = "heloo"+'<font size="12" color="0xff0000"  >*</font>';                               
                  }
              ]]>
          </mx:Script>
      </mx:Application>

       

       

      Thanks,

        • 1. Re: font tag problem in flex
          ShardulSingh Level 3

          Hi,

          Don’t have any proper solution for your problem but you can try this one,hope it will help you.

           

           

           

           

          Main Applicaiotn.mxml

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

                layout="horizontal">

               

              <mx:HBox horizontalGap="0">

                <mx:Label id="l" text="show" />

                <mx:Label id="lbl2" htmlText="*" color="0xff0000" visible="false"/>

              </mx:HBox>

             

              <mx:Button label="change" click="clik()"/>

              <mx:Script>

                  <![CDATA[

                      private function clik():void

                      {

                          l.htmlText = "heloo";

                          lbl2.visible = true;

                      }

                  ]]>

              </mx:Script>

              </mx:Application>

           

           

           

           

           

          With Regards,

           

          Shardul Singh Bartwal