I wanted make list with recent files. I also wanted make grey these items, that match file not exists (click File-->Reopen-->Properties in Delphi to see what I want to do). This is what I have:
Delphi-Quellcode:
begin
with lvRecentFiles, lvRecentFiles.Canvas do
begin
if FileExists(Item.Caption) then
Pen.Color := clBlack
else
Pen.Color := clGrayText
;
TextOut(Rect.Left + 2, Rect.Top + 2, Item.Caption);
end;
end;
I want just grey text if file not exists. Any help with this?