检查节点是否可见很容易.但我不知道如何正确定义该节点在屏幕上显示.我只能这样发现:
BottomNode := Tree.BottomNode;
Node := Tree.TopNode;
IdBottomNode := Tree.AbsoluteIndex(BottomNode);
while Tree.AbsoluteIndex(Node) <> IdBottomNode do
begin
Node := Node.NextSibling;
if not Assigned(Node) then
Break;
end;
Run Code Online (Sandbox Code Playgroud)
(代码没有检查)
但我认为这是相当粗糙的方式.可能是有更准确的方法吗?