title: Load ImageList picture in TImage with a ComboBox
body: <p>In my Delphi form I have an ImageList with 4 pictures. There are also a ComboBox called <code>ComboBox1</code> and a TImage component that is called <code>Image9</code>.</p>
  
  <p>I've created an <code>onChange</code> for my ComboBox because I'd like to do a thing like this: if the ComboBox item 1 is selected, then load the image 1 in my ImageList. Same case if ComboBox item 3 is selected (for example), load the image 3 of ImageList.</p>
  
  <p>The code I wrote is this:</p>
  
  <pre><code>case ComboBox1.Items[ComboBox1.ItemIndex] of
  0:
   begin
    ImageList1.GetBitmap(0,Image9.Picture);
   end;
  1:
   begin
    ImageList1.GetBitmap(1,Image9.Picture);
   end;
  2:
   begin
    ImageList1.GetBitmap(2,Image9.Picture);
   end;
  3:
   begin
    ImageList1.GetBitmap(3,Image9.Picture);
   end;
  end;
  </code></pre>
  
  <p>With this code, the IDE (I'm using Delphi XE4) is giving me an error on <code>case ComboBox1.Items[ComboBox1.ItemIndex] of</code> because it says that an Ordinal type is required. What could I do?</p>