title: Select an item in a combobox and set the combobox text to a different one?
body: <p>I want to make a <code>ComboBox</code> where the user can type an integer value into the text area, but the drop-down list contains several "defaults" values.  For instance, the items in the drop-down list would be formatted like this:</p>
  
  <ul>
  <li>Default - 0</li>
  <li>Value 1 - 1</li>
  <li>Value 2 - 2</li>
  </ul>
  
  <p>What I want is that when the user selects an item (e.g. "Default - 0"), the <code>ComboBox</code> text will display only the number "0" rather than "Default - 0". The word "Default" is just informational text.</p>
  
  <p>I have played with the following events: <code>SelectedIndexChanged</code>, <code>SelectedValueChanged</code>, and <code>SelectionChangeCommitted</code>, but I was not able to change the text of the <code>ComboBox</code>.</p>
  
  <pre><code>private void ModificationCombobox_SelectionChangeCommitted(object sender, EventArgs e)
  {
       ComboBox comboBox = (ComboBox)sender; // That cast must not fail.
       if (comboBox.SelectedIndex != -1)
       {
          comboBox.Text = this.values[comboBox.SelectedItem.ToString()].ToString(); // Text is not updated after...
       }
   }
  </code></pre>