To add the event handler code

  1. In the VCL form view, select ComboBoxl.
  2. In the Object Inspector, click the Events page, and double-click the OnDrawItem event.

The Code editor displays with cursor in the code block of the ComboBoxIDrawItem event handler.

  1. Enter the following code for the event handler:
  2. Canvas.FillRect(rect);
  3. Draw(ComboBox1.Canvas, Rect.Left, Rect.Top, Index); Combobox1.Canvas.TextOut(Rect.Left+ImageList1.Width+2, Rect.Top, ComboBox1.Items[Index]);
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment