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);
0 0 vote
Article Rating
Subscribe
Notify of
guest
13 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Mariya
Mariya
8 years ago

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

With respect to you, Mary.

Asp Kodlar?
8 years ago

how can i get font list with web application? thanks.

Mike
Mike
9 years ago

Funciono muy bien… muchas gracias…

Claus Haynes
9 years ago

Thank you very much for the valuable information

Bondara UK
9 years ago

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

Tom
9 years ago

Excellent example, and good for both the old school with AS2 (myself) and the newer version. Thanks!!

Maurita Hosford
9 years ago

Very detailed post can i translate into German for our blogs visitors? Thanks

Ebel wathes
10 years ago

Lovely thank you for the info. A inspirational piece of info.

car radio mounting
10 years ago

Thans for the nice post.

cyberprodigy
10 years ago

It is not working for me. Combobox doesn’t change.

cyberprodigy
10 years ago
Reply to  Andrew

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.