小编hum*_*red的帖子

使用隐藏节点着色VirtualStringTree行

我目前在我的树的OnBeforeCellPaint事件中使用此代码:

if Node.Index mod 2 = 0 then
begin
  TargetCanvas.Brush.Color := clBlack;
  TargetCanvas.FillRect(CellRect);
end
else
begin
  TargetCanvas.Brush.Color := clPurple;
  TargetCanvas.FillRect(CellRect);
end;
Run Code Online (Sandbox Code Playgroud)

为我的节点着色.但是对于隐藏节点,这不起作用,因为索引保持不变.是否有可见的索引或简单的解决方法?

提前致谢.

delphi virtualtreeview delphi-xe2 tvirtualstringtree

4
推荐指数
1
解决办法
349
查看次数