title: How do I change the style property - textInputStyleName of a combobox at runtime?
body: <p>I have a prompt string to be displayed in my combobox - this needs to be displayed in <em>italics</em>. When user makes any selection from the list - i need to change the style of the displayed content. </p>
  
  <p>My css file:</p>
  
  <pre><code>.promptStyle
  {
      fontStyle: italic;
  }
  ComboBox.withPrompt
  {
      color: #FF0000;
      fontWeight: normal;
      textInputStyleName: promptStyle;
  }
  .regularStyle
  {
      fontStyle: normal;
  }
  ComboBox.withoutPrompt
  {
      color: black;
      fontWeight: normal;
      textInputStyleName: regularStyle;
  }
  </code></pre>
  
  <p>My MXML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
              minWidth="955" minHeight="600" initialize="init()"&gt;
  
  &lt;mx:Script&gt;
      &lt;![CDATA[
          [Bindable]
          private var content:Array=new Array("Red", "Blue", "Green");
  
          private function init():void {
              StyleManager.loadStyleDeclarations("combos/combo_style.swf");
          }
  
          private function changeStyle():void {
              var index:int = promptBox.selectedIndex;
              if(index != -1)
                  promptBox.setStyle("styleName","withoutPrompt");
          }
      ]]&gt;
  &lt;/mx:Script&gt;
  
  &lt;mx:ComboBox id="promptBox" prompt="Select a color" dataProvider="{content}"
          styleName="withPrompt" change="changeStyle()"/&gt;
  &lt;/mx:Application&gt;
  </code></pre>
  
  <p>I am able to see the style change happening because the color changes; but the change specific to textInputStyleName does not get applied. Any help would be appreciated.</p>