Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- function GetVisibleIndex(Tree: TBaseVirtualTree; Node: PVirtualNode): Integer;
- var
- P: PVirtualNode;
- begin
- Assert(Assigned(Node), 'Node must not be nil!');
- Assert(Tree.IsVisible[Node], 'Node must be visible!');
- Result := 0;
- P := Tree.GetFirstVisible;
- while Assigned(P) and (P <> Node) do
- begin
- Inc(Result);
- P := Tree.GetNextVisible(P);
- end;
- end;
Add Comment
Please, Sign In to add comment