多谢jsxjd
请问在哪个事件中画,我在OnCustomDrawSubItem()中画了:
procedure TMymain.MyListCustomDrawSubItem(
Sender: TCustomListView; Item: TListItem; SubItem: Integer;
State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if SubItem = 0 then
begin
with MyList.Canvas do
begin
Font.style:=[fsBold];
TextOut(Rect.Left, Rect.top, copy(Item.SubItems[0], 1, 2));
font.style:=[];
TextOut(Rect.left+3,Rect.top,copy(Item.SubItems[0], 3, length(Item.SubItems[0]) - 2));
end;
end;
end;
编译时总说Rect.地方没有足够的参数(Not enough actual parameters)
可是我看了帮助,就是这3个参数啊,我哪里错了,请帮忙,谢谢!