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);
Comments
Trackbacks
There are no trackbacks on this entry.

It is not working for me. Combobox doesn’t change.
Have you got an instance name for your textfield?
Is the code inserted at the same scope?
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.
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!
Thans for the nice post.
Lovely thank you for the info. A inspirational piece of info.
Very detailed post can i translate into German for our blogs visitors? Thanks
Excellent example, and good for both the old school with AS2 (myself) and the newer version. Thanks!!
I am a regular reader of your blog and would just like to say thanks! I have even been inspired to start my own site so please have a look. Bondara UK
Thank you very much for the valuable information
Funciono muy bien… muchas gracias…