Questions tagged [virtualtreeview]

Virtual Treeview is free Delphi component written by Mike Lischke.

Home page: http://www.jam-software.de/virtual-treeview/
Code: https://github.com/Virtual-TreeView/Virtual-TreeView/

Virtual Treeview is a tree view control built from ground up. More than a decade of development made it one of the most flexible and advanced tree controls available today. Virtual Treeview starts off with the claim to improve many aspects of existing solutions and introduces some new technologies and principles which were not available before.

As the name already indicates, this control uses a different paradigm for tree management than other controls of this kind. It does not know anything about the data it manages (except its size), not even the captions of a node. Everything is retrieved from the application via events (or descendants via overridden methods).

Virtual Treeview has been carefully designed and thoroughly tested. The control proved its concept as well as everyday fitness already in many commercial products and freeware projects.

309 questions
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
2 answers

How to hide expand/collapse button in Virtual Treeview?

I use VirtualStringTree (VST) to display data that is grouped, header-details. I need to have an option to allow user to expand, collapse headers to see details and in some cases I need to show data as static view, where they can't expand, collapse,…
Mike Torrettinni
  • 1,816
  • 2
  • 17
  • 47
5
votes
3 answers

VirtualTreeView embedding button in the cells

I'm trying to create node with TButton. I Create the node and the buttons linked to the nodes. On the event TVirtualStringTree.AfterCellPaint, I initialise the BoundsRect on the button. But the button is always shown in the first node. Have you some…
r038tmp5
  • 105
  • 1
  • 5
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…
5
votes
1 answer

How to enable checkboxes in Virtual TreeView columns headers?

I'm using Virtual TreeView V5.0.1 (06 Sep 2012) in Delphi XE2. Setting CheckBox := True on a header column property does not enables the checkbox, so here's the question, how do I enable checkboxes on column headers?
Kromster
  • 7,181
  • 7
  • 63
  • 111
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
5
votes
1 answer

How do I show virtual tree-view grid lines for nodes that don't exist yet?

I use SoftGem's VirtualStringTree in Delphi 7. Is there a way to enable full grid lines (just as in a TListView)? I can only find toShowHorzGridLines, which only shows lines for current nodes, not anything in the empty space below, and…
Ben
  • 3,380
  • 2
  • 44
  • 98
4
votes
2 answers

VirtualTreeView: Check if node is visible

How to check if a node is visible (on screen) with VirtualTreeView component? Something like this: if not Grid.NodeVisible (Node) then Grid.ScrollIntoView (Node, True); The node should be centered if it was not visible, but remain where it is if…
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
4
votes
3 answers

VirtualTreeView component for XE2

Where can I get a VirtualTreeView component for Delphi XE2? I can see the download for VirtualTreeView as the top link here: http://www.soft-gems.net/index.php?option=com_content&task=view&id=30&Itemid=35 But there's no package for Delphi XE2 and…
Johan
  • 74,508
  • 24
  • 191
  • 319
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
1 answer

How to know a node is root in Virtual TreeView?

I am using Virtual Tree View. Is there a reliable way to know if a node is root or not? I try to use if not Assigned(Node.Parent) then Output('This is root') else Output('This is not root') But does not work. I try to use if Node =…
alancc
  • 487
  • 2
  • 24
  • 68
4
votes
1 answer

Is it safe to access VT data from the other thread?

Is it safe to change VirtualTreeView data from the secondary thread ? And if yes, should I use critical sections (or even Synchronize method) ? I'm afraid that when I'll be writing to the VT's data record from the other thread, main thread invokes…
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