title: Replace text in ComboBox upon selecting an item
body: <p>I have an editable ComboBox that should contain a path. The user can select several default paths (or enter his own) from a dropdown list, such as <code>%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\ (All Users)</code>. The items in the dropdown list contain a short explanation, like the <code>(All Users)</code> part in the former example. Upon selection of such an item, I want to remove this explanation, so that a valid path is displayed in the ComboBox.</p>
  
  <p>I currently strip the explanation out of the string and try to change the text via setting the <code>Text</code> property of the ComboBox. But this doesn't work, the string is parsed correctly, but the displayed text won't update (it stays the same as in the dropdown list, with the explanation).</p>
  
  <pre><code>private void combobox_TextChanged(object sender, EventArgs e) {
              //..             
  
                 string destPath = combobox.GetItemText(combobox.SelectedItem);                  
                 destPath = destPath.Replace("(All Users)", "");                   
                 destPath.Trim();                   
                 combobox.Text = destPath; 
  
              //..
  }
  </code></pre>