I\'m convinced this must be a common problem, but I can\'t seem to find a simple solution...
I want to use a combobox control with name value pairs as the items. ComboBo
Set Style to csOwnerDrawFixed and write
Style
csOwnerDrawFixed
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin ComboBox1.Canvas.TextRect(Rect, Rect.Left, Rect.Top, ComboBox1.Items.Names[Index]); end;