# Combo box style

**URL:** https://forum.kirupa.com/t/combo-box-style/327962
**Category:** Uncategorized
**Created:** [April 9, 2012, 1:50pm UTC](https://forum.kirupa.com/t/combo-box-style/327962 "2012-04-09T13:50:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![revo999](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@revo999](https://forum.kirupa.com/u/revo999)
#### Post date: [April 9, 2012, 1:50pm UTC](https://forum.kirupa.com/t/combo-box-style/327962/1 "2012-04-09T13:50:01Z")

</div>

I am switching Combobox values run-time

initally Styles works fine [by default], WHEN switch values runtime

styles does not works

**Default style:**

```auto

var tf_cb:TextFormat = new TextFormat(); 

tf_cb.size = 14;

length_cb.textField.setStyle("textFormat", tf_cb); 

length_cb.dropdown.setRendererStyle("textFormat", tf_cb);
length_cb.setStyle("fontWeight", "bold");

length_cb.dataProvider = new DataProvider(myItems1);

```

**on Switching values / adding new set of values runtime** [Styles not works]

```auto

var tf2_cb:TextFormat = new TextFormat(); 

tf2_cb.size = 14;

length_cb.textField.setStyle("textFormat", tf2_cb); 

length_cb.dropdown.setRendererStyle("textFormat", tf2_cb);

length_cb.setStyle("fontWeight", "bold");
length_cb.dataProvider = new DataProvider(myItems2);

```
