tvirtualstringtree

How to color blend cells with a background image in VirtualTreeView?

非 Y 不嫁゛ 提交于 2019-11-29 15:21:00
问题 I'm using VT.Background to display a background image in VT with a few columns. But I can't find a way to use different colors for cells because they hide the background image. I have tried to use OnBeforeItemErase but if I use EraseAction := eaColor the background bitmap area on the cell is also being painted, if I use eaDefault the color is not being applied. Any idea how this can be done? 回答1: Just an attempt to guess if that's what you are looking for: Update: Added a color blending

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

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