VirtualStringTree is a Delphi component, VirtualTreeview descendant designed to make it easy to show string data.
Questions tagged [tvirtualstringtree]
148 questions
6
votes
1 answer
TVirtualStringTree and vertical Scroll is not working properly
I have learned how to use TVirtualStringTree, and I've found it excellent. I have one custom non-visual list called PackedList which is filled by another thread. And I want to show all list content in TVirtualStringTree at realtime. So I put one…

Mehmet Fide
- 1,643
- 1
- 20
- 35
5
votes
1 answer
VirtualStringTree CellPaint
Well, I have the following problem:
I've painted the tree cells in different colors depending on some boolean…

stOrM
- 103
- 1
- 9
5
votes
1 answer
How best to render an overlay icon on top of basic Delphi TVirtualTreeView node icon
I'm converting a tree view from the standard TTreeView to use TVirtualStringTree. My final challenge is to implement a feature where I need to draw a 'pass/fail' status indicator on top of the known node icon. With TTreeView I used:
var
R :…

Brian Frost
- 13,334
- 11
- 80
- 154
5
votes
0 answers
VirtualStringTree - different formats of text in the same multiline node
I have an instance of TVirtualStringTree that formats text of a node in two different ways. The implementation is based on using toShowStaticText in the StringOptions as described in the accepted answer of this question: VirtualTreeView - different…

Wosi
- 41,986
- 17
- 75
- 82
5
votes
2 answers
TVirtualStringTree - add object instead of record
I have a TVirtualStringTree(version 5.2.2) and I need to add to it's nodes objects instead of records.
I have already looked at the answers provided on the question:
Delphi, VirtualStringTree - classes (objects) instead of records but they are not…

RBA
- 12,337
- 16
- 79
- 126
5
votes
1 answer
VirtualStringTree - Pointer stored <> Pointer retrieved ! Is my coding approach wrong?
I'm using a TVirtualStringTree to store pointers to records.
Originally there is a TList that contains the list of records.
I'm using the OnInitNode event to iterate through the TList and assign each records' data to the tree's nodes.
However, when…

Steve F
- 1,527
- 1
- 29
- 55
5
votes
1 answer
How to define that node of TVirtualStringTree is presented on screen?
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…

Dmitrii_Demin
- 77
- 4
5
votes
1 answer
How to select all root or all child nodes in VirtualStringTree?
I would like to select either all root nodes or all child nodes (not all nodes in a VirtualTreeView).
I've tried to use this code to select all root nodes:
procedure SelectAllRoots;
var
Node: PVirtualNode;
begin
…

Ben
- 3,380
- 2
- 44
- 98
4
votes
2 answers
VirtualStringTree Correct/recommended use
I have been using virtualstringtree for a while now. I use it for two different things, first a s a normal tree for selecting ,displaying data and secondly as a grid to show outputs from SQL statements.
All my data loaded in to the trees is from a…

Simon
- 9,197
- 13
- 72
- 115
4
votes
2 answers
How to paint the background color in special level in TVirtualStringTree
I try to paint a hightline text using backgroundcolor in all sepecial level of VirtualStringTree. It look like a selected nodes for all same level.
The code below doesn't work. Please someone give a direction.
procedure…

u950321
- 195
- 7
4
votes
1 answer
How to auto size spanned column in TVirtualStringTree?
I have simple example of VirtualStringTree (VST) with 4 columns and in 2nd or 3rd column I could have more text that fit the default column width. I have hoAutoSpanColumns enabled so the large text will overlap other columns, if they are empty. This…

Mike Torrettinni
- 1,816
- 2
- 17
- 47
4
votes
1 answer
How to make a proper alternate row color on a filtered TVirtualStringTree
Previously I used this VirtualStringTree for showing all of the nodes, and I used the Node.Index to check the odd and even rows inside the OnBeforeCellPaint event.
But when I filtered the nodes, I realized that the Node.Index is irrelevant to be…

aurallion
- 149
- 1
- 1
- 6
4
votes
2 answers
Overlaid images with TVirtualStringTree.OnGetImageIndex
I'd like to display an image from the ImageList1 in the vtTest component as an overlay.
I've found many resources on the Internet and here in SO - like this - but I can't get none of them to work properly.
I'm sure I'm missing something extremely…

fantaghirocco
- 4,761
- 6
- 38
- 48
4
votes
1 answer
zoom-in TVirtualStringTree
I want to find the "best way" to zoom-in /zoom-out a TVirtualStringTree.
"Zoom-in" means mimic a magnifying glass.
"best way" must be understood by using, in priority, properties /methods that are devoted to this in the TVirtualStringTree control.…

Didier Cabalé
- 385
- 3
- 10
4
votes
1 answer
How to get notified when the user clicks the header column check box in VirtualTreeView control?
Is there an event notifying about the VirtualTreeView header column check box click? It is the check box highlighted on this picture:

Thiago Dias
- 121
- 6