Hallo,
versuch doch mal bitte folgendes:
Delphi-Quellcode:
procedure TForm1.ListView1AdvancedCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
var DefaultDraw: Boolean);
var
lv: TListView;
ACanvas: TCanvas;
begin
if (Sender is TListView) and (Stage = cdPostPaint) then
begin
lv := Sender as TListView;
ACanvas := TCanvas.Create;
ACanvas.Handle := GetWindowDC(Item.Handle);
try
Button1.PaintTo(ACanvas, lv.Columns[0].Width, Item.DisplayRect(drBounds).Top);
finally
ReleaseDC(Item.Handle, ACanvas.Handle);
ACanvas.Free;
end;
end;
end;
Funktioniert bei mir. Aber eben nur unter D2007 und Vista ohne Groups.
Greez, Chris