virtualtreeview

How to define that node of TVirtualStringTree is presented on screen?

佐手、 提交于 2019-11-28 12:31:19
It's easy to check that node is visible. But I don't know how to rightly define that node is presented on screen. I can find out only so: 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; (code without checking) But I think it is rather rough way. May be is there more accurate way? You may write a function like follows. The Tree parameter there specifies the virtual tree, the Node is the node for which you want to check if

Delphi - ListView or similar with owner draw button

北城余情 提交于 2019-11-28 04:51:34
问题 How do I do create a listview (or similar) with a button on each line? The button needs to be able to have different text/color on each line as required. I'm sure Virtual Treeview would be perfect for this, but I'm a little lost with it. Thanks -Brad 回答1: With a virtualtreeview...... add vstButton to your uses and select your Virtualtreeview in the object inspector and set the following events for your tree: procedure TForm1.VSTCreateEditor(Sender: TBaseVirtualTree; Node: PVirtualNode; Column

How to define that node of TVirtualStringTree is presented on screen?

两盒软妹~` 提交于 2019-11-27 07:06:39
问题 It's easy to check that node is visible. But I don't know how to rightly define that node is presented on screen. I can find out only so: 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; (code without checking) But I think it is rather rough way. May be is there more accurate way? 回答1: You may write a function like follows