|
楼主 |
发表于 2007-7-5 17:33:52
|
显示全部楼层
我把代码加到如下事件里,打开功能时特别慢
在业务信息层加的打码如下:
procedure TYBPCB.DataGridCustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TTreeListNode; AColumn: TTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: Integer; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
begin
if not (ASelected or AFocused) then
begin
if (ANode.Index mod 2) = 1 then
AColor := $0F0F0F0;
end;
DataGrid.FullExpand;
if ANode.HasChildren then
begin
//AColor := $0F0E0F0;
//AFont.Size := AFont.Size + 2;
AText := StringUtils.Copy(AText, StringUtils.Pos(':', AText) + 2, 10);
end;
end; |
|