Skip to main content
Participant
November 10, 2010
Answered

Customizing the style (font, color, etc) of a combobox

  • November 10, 2010
  • 3 replies
  • 775 views

Hello,

Does anyone know how to change the font and overall look of a combobox in Flash / ActionScript 3?

Are there theme files I could download, or a script I can use?

I am relatively familiar with AS3 / Flash, but have never needed to skin a combobox till now.

Any pointers would be much appreciated!

Thanks much,

Ben

This topic has been closed for replies.
Correct answer Lee_Burrows

you can style the main text (assuming your combobox has instance name of cb) with:

var tf:TextFormat = new TextFormat("Arial", 24, 0xFF0000);
cb.textField.setStyle("textFormat", tf);

the dropdown list is more problematic - i have never been able to get it to style properly (maybe because it is not created until it needs to be displayed so setStyle gets ignored?)

3 replies

Participant
November 10, 2010

Thanks very much, I really appreciate it!!

Participant
November 10, 2010

Ok, great, thanks!

But how would you change the font?

Ben

Lee_Burrows
Lee_BurrowsCorrect answer
Participating Frequently
November 10, 2010

you can style the main text (assuming your combobox has instance name of cb) with:

var tf:TextFormat = new TextFormat("Arial", 24, 0xFF0000);
cb.textField.setStyle("textFormat", tf);

the dropdown list is more problematic - i have never been able to get it to style properly (maybe because it is not created until it needs to be displayed so setStyle gets ignored?)

Lee_Burrows
Participating Frequently
November 10, 2010

in your library there will be a folder called "Component Assets" which contains all the skin parts for the combobox (if its not there, drag a combobox into the library). you can then edit the skin parts by double clicking them.