0 Replies Latest reply on Jan 20, 2014 3:45 PM by pol2095

    When the state change, my StyleableTextField html formatting is lost

    pol2095 Level 1

      Hello,

       

      When the state change, my StyleableTextField html formatting is lost (mobile project)

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                addedToStage="ats(event)">
                <fx:Script>
                          <![CDATA[
                          import spark.components.supportClasses.StyleableTextField;
                          protected function ats(event:Event):void
                          {
                                    StyleableTextField(txt.textDisplay).htmlText="<i>test</i>";
                          }
                          public function ok(e:Event):void{
                                    currentState = "state2";
                          }
                          ]]>
                </fx:Script>
                <s:states> 
                          <s:State name="initialState" />
                          <s:State name="state2" />
                </s:states>
                <s:VGroup>
                          <s:TextArea width="100%" id="txt" includeIn="initialState, state2" skinClass="spark.skins.mobile.TextAreaSkin"/>
                          <s:Button label="add" click="ok(event);" includeIn="initialState, state2"/>
                          <s:TextArea width="100%" text="state2" includeIn="state2"/>
                </s:VGroup>
      </s:Application>
      
      

       

      Thanks