title: Set ComboBox text on selection
body: <p>I am working on an application where i have a combobox with long text values.Since the text values are large(in term of characters ..20 or more), to display in the combobox, the requirement was to display on the <code>first</code> character after selecting from the drop down.
  Like in the image marked in red. if the user selects 3th item <code>3 0.5 to 1.25 Slight</code> i should only display the <code>3</code> in the combobox.</p>
  
  <p><img src="https://i.stack.imgur.com/Relwk.jpg" alt="enter image description here"></p>
  
  <p>So i tried this</p>
  
  <pre><code>   sTheSelectedValue : string;
  
    procedure TForm1.ComboBox1Select(Sender: TObject);
    begin
     sTheSelectedValue:=TrimTextAndDisplay(ComboBox1.Text); //send theselected value
     ComboBox1.Text :='';                                   //clear the selection
     ComboBox1.Text:=sTheSelectedValue;                     //now assign as text to combo box   
     Button1.Caption:=ComboBox1.Text;                      //just show the new value on the button.
    end;
  
  
     function TForm1.TrimTextAndDisplay(TheText : string): string;
     var
     sTheResult : string;
       begin
          sTheResult :=copy(TheText,0,1); //extract the first value..
          Result     :=sTheResult;
       end;
  </code></pre>
  
  <p>The result is <img src="https://i.stack.imgur.com/TOhUC.jpg" alt="enter image description here"></p>
  
  <p>The button seem to show the proper value but not the combobox.</p>
  
  <p>what i want is to get <code>3</code> in the combobox, i cant seem set <code>ComboBox1.Text:=</code> 
  can any one tell me how to do it? 
  like this on selection of from the combobox the result should be
  <img src="https://i.stack.imgur.com/lR24J.jpg" alt="enter image description here"></p>