Draw a selection in a listview
Posted on 2010-09-13
I have a listview on my form, with the the property OwnerDraw is True.
I want to draw a selection, just like the property RowSelect
(Brush = darkblue and white font)
This is what I got, but I don't get further than this:
procedure TMainForm.lstvFoodDBCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
if Item.Selected then
Sender.Brush.Color := clNavy;
Sender.Brush.Color := clWIndow;
Who can help me?