VirtualStringTree is a Delphi component, VirtualTreeview descendant designed to make it easy to show string data.
Questions tagged [tvirtualstringtree]
148 questions
3
votes
1 answer
Ctrl+End behavior of TVirtualStringTree
When user press Ctrl+End, VirtualStringTree jumps to the end vertically which is fine but also horizontally. I don't want it to go to the end horizontally. Horizontal scroll should be leaved as is.
How to tell this?

Mehmet Fide
- 1,643
- 1
- 20
- 35
2
votes
2 answers
VirtualStringTree - Multiline Nodes and centre text vertically
If a node in a VirtualStringTree is multiline (vsMultiline in Node.States) then how can i centre the text vertically for all columns (except the multiline column) in that node?
I have tried using the OnBeforeCellPaint (using TargetCanvas.TextOut())…

Simon
- 9,197
- 13
- 72
- 115
2
votes
4 answers
Writing data to PVirtualNode without setting each field value manually
Lets say I have this node data record:
Type
PPerson = ^TPerson;
TPerson = record
Name: String;
Age: Integer;
SomeBool: Boolean;
end;
To populate my VirtualStringTree, I would do this:
Procedure AddToTree(Person: TPerson);
Var
Node:…

Jeff
- 12,085
- 12
- 82
- 152
2
votes
1 answer
Populating VirtualStringTree as virtually as possible?
I'm trying to populate a VirtualStringTree. My underlying data are like this, here showing 3 of many branches, each of which has a varied number of twigs.
string 1
chunk:string 1, fname:c:\temp\file0.txt, freq:8
chunk:string 1,…

Mike Scott
- 169
- 2
- 8
2
votes
1 answer
How to update the VirtualStringTree scrollbars?
i am having hard time to fix my problem on VirtualStringTree.
I have NodeData which initially added with a Node.NodeHeight
or the DefaultNodeHeight.
The problem now was I'm going to change each of the NodeHeight into different size. As a result,…

XBasic3000
- 3,418
- 5
- 46
- 91
2
votes
2 answers
Parent of RootNode of TVirtualStringTree
According to documentation, property RootNode of TVirtualStringTree is a hidden node, parent of all user created nodes. But the Parent of the RootNode is set. I am facing the following problem:
Sometimes, when closing a form that have a…

Rodrigo Caetano
- 379
- 1
- 13
2
votes
2 answers
Access Violation when assigning string in InitNode event of TVirtualStringTree
The given code which works without any problems in Delphi 2007. However in Delphi 2009 I am getting an exception.
Access violation shows read of address $00000000.
The problem exists only when assigning string, it works for numbers.
Also, when I…

Wodzu
- 6,932
- 10
- 65
- 105
2
votes
1 answer
Delphi, TVirtualStringTree, WM_SIZE events when resizing columns
I have a descendant of TVirtualStringTree class with my own autosizing columns procedure. To make it work whenever the size of the control is changed I have overriden the Resize procedure:
type
TMyVirtualStringTree = class(TVirtualStringTree)
…

Molochnik
- 704
- 5
- 23
2
votes
2 answers
How to get a number of displayed nodes in TVirtualStringTree?
I need to show a long db table in the TVirtualStringTree (e.g. 50000 records). To lower query execution time I limit the number of records with only those that are actually displayed in the tree. The code snippet of handling OnGetText is below. The…

Molochnik
- 704
- 5
- 23
2
votes
2 answers
TVirtualStringTree - setting column cells/nodes Alignment
I have a VirtualStringTree with a Header.Column set to taLeftJustify (default).
Is there a way to set the cells/nodes of that column to taRightJustify so that the nodes will be justified to the right, but the header column text will be justified to…

zig
- 4,524
- 1
- 24
- 68
2
votes
2 answers
TVirtualStringTree ScaleBy Stretch
I'm Trying to get a VST to resize automatically when its Height and Width is changed.
I don't have this problem with other placed VCL components, some of them have a Property "Stretch" like TImage, which lets them adjust automatically. The VST…

hzzmj
- 121
- 11
2
votes
1 answer
VirtualStringTree filtering done right
I'm looking for a quick way to filter nodes in a VirtualStringTree based on a filter rule, especially when the filter rule changes. There is a filter mechanism built in the VST where you can define whether the node is filtered out.
My solution right…

dominikkv
- 216
- 3
- 13
2
votes
1 answer
How to drag and drop nodes from TVirtualStringTree into a VCL control with DragType dtOLE?
Is it possible to drag and drop nodes from TVirtualStringTree into a VCL control when the DragType is set to dtOLE (not dtVCL)
I have a situation where I need to be able to drag nodes from one VT to another VT (dtOLE works fine), but at the same…

zig
- 4,524
- 1
- 24
- 68
2
votes
2 answers
How to retrieve selected nodes in VirtualStringTree after selection changed?
I have VST with MultiSelect option enabled. How can I retrieve the list of selected nodes in VirtualStringTree when the selection changes via keyboard events?
I tried using the below code in the OnFocusChanged event
procedure…

RaelB
- 3,301
- 5
- 35
- 55
2
votes
1 answer
Ending or Cancelling a Drag Drop Operation in a Delphi Application
I am dragging and dropping email attachments from outlook.
The files are dropped into a Virtual Tree View.
My import function at the end of the drag over event takes a while to process the files and it freezes the outlook application until the…

MBass
- 63
- 4