应该不难:在OnDrawItem中如何使得该控件缺省的OnDrawItem也执行?
RT。俺用了一句Inherited;好象不解决问题……在TListBox中。比如:
procedure TfrmHiQuery.lstResultDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
sExecStat: AnsiString;
begin
with lstResult do
begin
sExecStat := ......;
if sExecStat = 'done' then
Canvas.Font.Color := clGreen;
end;
inherited;
end;
则运行后lstResult中什么也显示不出来了……