# Combobox to change font type

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 7:19pm UTC](https://forum.kirupa.com/t/combobox-to-change-font-type/65536/2 "2004-09-27T19:19:48Z")

</div>

I use the MX only but whit setNewTextStyleFormat(or something like this) is working fine all the time. Define a new textFormat.font = comboBox."Value"  
U better search for installed fonts on the client comp. and load the search results in the combobox
