# Combobox to change font type

**URL:** <https://forum.kirupa.com/t/combobox-to-change-font-type/123798>\
**Category:** Uncategorized\
**Created:** [September 27, 2004, 2:01pm UTC](https://forum.kirupa.com/t/combobox-to-change-font-type/123798 "2004-09-27T14:01:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrettRT](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@BrettRT](https://forum.kirupa.com/u/BrettRT)\
**Post date:** [September 27, 2004, 2:01pm UTC](https://forum.kirupa.com/t/combobox-to-change-font-type/123798/1 "2004-09-27T14:01:33Z")

</div>

I have a textarea I want the font changed for when they choose the corresponding font from a combobox.

On the combo box itself I have it named “myCombo”. This is the code for it…

```auto
on (change) {
  	if (myCombo.getSelectedItem() == "Garamond") {
  		user_output.setStyle("fontFamily", "Garamond"); 
  	} else if (myCombo.getSelectedItem() == "Arial") {
  		user_output.setStyle("fontFamily", "Arial"); 
  	} else if (myCombo.getSelectedItem() == "Verdana") {
  		user_output.setStyle("fontFamily", "Verdana"); 
  	}
  }

```

the textarea is called user\_output.

Ideas?
