如何改变TlistView的选中的一行的背景色
在TListView中,系统默认选中某一项时,背景色是蓝色,字为白色,
我想把它的颜色改掉,但总是不行
我在CustomDrawItem事件里写
if Item.Selected then
begin
lvTests.Canvas.Brush.Color := clYellow
lvTests.Canvas.Font.Color := clBlack;
end
else begin
lvTests.Canvas.Brush.Color := clWindow;
lvTests.Canvas.Font.Color := clBlack;
end;
未选中的行可以更换颜色,而选项中的行的颜色始终为蓝色.
请大家帮忙