Change combobox font size in Flash Actionscript

Ever needed to change the font size of a standard flash combobox component?

You will need to give it an instance name e.g. “myCombobox” and then add the following code:

myCombobox.setStyle("fontSize", 10);

13 thoughts on “Change combobox font size in Flash Actionscript”

  1. CyberProdigy, thanks a lot!!! For a long time I could’t change size of font in textfield in combobox.

    With respect to you, Mary.

      1. Wow, that was a quick reply from you (;

        Yes, scope was correct, but what did work in the end, however, was this piece of code.

        var tf:TextFormat = new TextFormat();
        tf.size = 30; myCombobox.textField.setStyle(“textFormat”, tf); myCombobox.dropdown.setRendererStyle(“textFormat”, tf);

        I hope we are both talking about AS3 here (;. Nice blog, btw.

        1. Thanks for the useful info.

          There would be the other problem, my example was done in Actionscript 2 and yours is in Actionscript 3.

          But at least now the answer for both versions are on one page! 🙂

Leave a Reply

Your email address will not be published.