« on: January 29, 2020, 01:41:14 pm »
With a ComboBox you can do this:
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer; ARect: TRect; State: TOwnerDrawState);
begin
ComboBox1.Canvas.FillRect(ARect); //first paint normal background
ComboBox1.Canvas.TextRect(ARect, 20, ARect.Top, ComboBox1.Items[Index]); //paint item text
ImageList1.Draw(ComboBox1.Canvas, ARect.Left + 1, ARect.Top + 1, Index); //draw image according to index on canvas
end;
Source:
WikisouIs this also possible for a TDBLookupCombobox?Is yes how?
« Last Edit: February 01, 2020, 11:44:14 am by madref »
Logged
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.
Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey