I want to draw custom list. First line is bolded string, if is last item, should draw additional line in normal style, simple:
Delphi-Quellcode:
begin
if Control is TCheckListBox then
begin
with TCheckListBox(Control) do
begin
Canvas.FillRect(Rect);
Canvas.Font.Style := [fsBold];
Canvas.TextOut(Rect.Left + 4, Rect.Top + 4, Items[Index]);
if Index = Count - 1 then
begin
Canvas.Font.Style := [];
Canvas.TextOut(Rect.Left + 4, Rect.Top + 21, OpenPictureDialog.FileName);
end;
end;
end;
end;
But it's simple in theory only. This code changing font style only and drawind only Items[I] in default position. What to do to get result I want?