Skip navigation
Currently Being Moderated

ComboBox::Getting text to be shown in Multiline.

Apr 12, 2012 5:10 PM

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.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 ( == "Add")


        newRow = + 1;

  {label:"screen" + newRow, data:"screenData" + newRow}, 






aCb.dropdown.rowHeight = 90

  • Currently Being Moderated
    Apr 12, 2012 7:02 PM   in reply to MathAdor

    I played with it for a short time and found that adding...


    TextInput(aCb.getChildAt(1)).textField.autoSize=TextFieldAutoSize.LEFT ;


    to the other two lines you have makes the textField go multine, however, the textfield that is being targeted by that is the one that displays in the top of the component.  The textfields that drop down are within a List component.  So you'll probably have to see if you can gain access to those and try the same.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points