3 Replies Latest reply on Apr 12, 2012 9:19 PM by MathAdor

    ComboBox::Getting text to be shown in Multiline.


      Hi All...


          I  created a comboBox(Using the one in Component/Flash). I am unable to make the texts in DropDown menu to be shown in MULTILINE.

          I have tried larger Row Heights and smaller texts so the issue is related to something else.


          I found this piece of code searching in archive discussions "TextInput(aCb.getChildAt(1)).textField.multiline=true;"

          not sure if it helps me in this problem or not...please let me know if you have a solution.





      ________________Action Script Code_____________________


      import fl.data.DataProvider;

      import fl.events.ComponentEvent;

      import fl.controls.TextInput;


      var myFormatBeige:TextFormat = new TextFormat();

      myFormatBeige.font = "Arial";

      myFormatBeige.size = 15;

      myFormatBeige.color = 666666;


      aCb.textField.setStyle("textFormat", myFormatBeige)


      aCb.dropdown.setRendererStyle("textFormat", myFormatBeige);


      var items:Array = [

      {label:"o", data:"screenData1"},

      {label:"I j", data:"screenData2"},

      {label:"A", data:"screenData3"},

      {label:"I ", data:"screenData4"},

      {label:"C", data:"screenData5"},

      {label:"A", data:"screenData6"}


      aCb.dataProvider = new DataProvider(items);

      aCb.addEventListener(ComponentEvent.ENTER, onAddItem);


      function onAddItem(event:ComponentEvent):void


          var newRow:int = 0;

          if (event.target.text == "Add")


              newRow = event.target.length + 1;

                  event.target.addItemAt({label:"screen" + newRow, data:"screenData" + newRow}, 






      aCb.dropdown.rowHeight = 90