# Styling a combo box

**URL:** <https://forum.kirupa.com/t/styling-a-combo-box/318448>\
**Category:** Uncategorized\
**Created:** [January 20, 2011, 3:03pm UTC](https://forum.kirupa.com/t/styling-a-combo-box/318448 "2011-01-20T15:03:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxelcat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maxelcat/32/2854_2.png) [@maxelcat](https://forum.kirupa.com/u/maxelcat)\
**Post date:** [January 20, 2011, 3:03pm UTC](https://forum.kirupa.com/t/styling-a-combo-box/318448/1 "2011-01-20T15:03:51Z")

</div>

Hi

I have an instance on the stage of a combo box called cb1 I want to alter the formatting of it. I have gone into the library and copied the ComboBox\_upSkin mc and called it upSkinBlue, set its class to upSkinBlue, exported it for action script.

Here’s my complete action script:

```auto
import fl.controls.ComboBox;
cb1.setStyle("upSkin","upSkinBlue");
cb1.addItem({label:"Apples"});
cb1.addItem({label:"Oranges"});
cb1.addItem({label:"Banana"});
cb2.addItem({label:"Spinach"});
cb2.addItem({label:"Salad"});
cb2.addItem({label:"Cucumber"});

```

When I run I get this error:

```auto
TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/addChildAt()
    at fl.controls::BaseButton/drawBackground()
    at fl.controls::BaseButton/draw()
    at fl.core::UIComponent/drawNow()
    at fl.controls::ComboBox/drawLayout()
    at fl.controls::ComboBox/draw()
    at fl.core::UIComponent/callLaterDispatcher()

```

guess I am doing something wrong, but can’t work out what. If you’re interested I a using a tutorial [here](http://flashscript.biz/flblogger/?cat=5) - scroll down to "Changing AS3 component styles with AS.

Any pointers very greatfully received - I attach a ss of my library and the “upSkinBlue” in case i am missing something there
