简单示例:
procedure 窗体.tlProjectCustomDrawDataCell(Sender: TcxCustomTreeList;
ACanvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo;
var ADone: Boolean);
begin
inherited;
if AViewInfo.Node.HasChildren then
begin
ACanvas.SetBrushColor(clYellow);
Exit;
end
else
begin
if (AViewInfo.Node.Values[col_CNT.ItemIndex] > 0) then
ACanvas.SetBrushColor(clBlue)
else
ACanvas.SetBrushColor(clRed);
Exit;
end;
end;