0 Replies Latest reply on Nov 27, 2010 2:21 AM by athiroy

    text format

    athiroy Level 1


      i am working in flex 4.

      i have  one text box in flex 4 and if focus in that text box it shoud display the one panel which contains fontfamily,fontsize, color etc.

      if i select the differnt font family the text box content sholud change that font family.

      i do well that one


      Now i have one more combobox which contains some wishes like "best wishes" etc.

      if i change the combobox  item then the text will displays the text content+ wishes.

      Now the problem is when click that combobox then the text format changed normally.

      but i want to display the same format.

      i use like this

                               var s:String=text1.text;       
                              var txtLayFmt:TextLayoutFormat = text1.getFormatOfRange(null,0,s.length);
                              txtLayFmt.fontFamily = fontDDL.selectedItem;


      the combobox change event like this

      private function combo_change(event:Event):void


          text1.text =firstText+ "\n\n \""+event.currentTarget.selectedItem.data+"\"";