S
smilboy
Unregistered / Unconfirmed
GUEST, unregistred user!
我的效果是行之间颜色相隔
出现滚动条后,一拖或者点击后就花了
,怎么办
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
inc(i);
if odd(i) then begin
listview1.Canvas.Brush.Color:=$00FEF4E7;
listview1.Canvas.FillRect(item.DisplayRect(drBounds));
end else begin
listview1.Canvas.Brush.Color:=$00F7F8F9;
listview1.Canvas.FillRect(item.DisplayRect(drBounds));
end;
end;
出现滚动条后,一拖或者点击后就花了
,怎么办
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
inc(i);
if odd(i) then begin
listview1.Canvas.Brush.Color:=$00FEF4E7;
listview1.Canvas.FillRect(item.DisplayRect(drBounds));
end else begin
listview1.Canvas.Brush.Color:=$00F7F8F9;
listview1.Canvas.FillRect(item.DisplayRect(drBounds));
end;
end;