Created by: gwideman, Dec 29, 2011 5:13 pm
Revised by: gwideman, Jan 19, 2012 5:21 am (5 revisions)

Notes on downloading, revising and building Virtual TreeView for Delphi XE2.



  • Package paths: I decided that since VT's installation might need some encouragement, I'd better understand how package paths work: Delphi -- notes on packages.
  • Install TortoiseSVN -- in order to be able to grab the VT source.


Source location:
Downloading using TortoiseSVN went smoothly.
  • Version I downloaded: 2012-01-14, r321 of Dec 15, 2011
  • The only hiccup was misunderstanding the checkout address in the blue "# Non-members may check out..." box, which gives the address within an actual command-line svn command. So the address (currently) is: "" without the "virtual-treeview-read-only" part.

Directory layout

I moved the entire downloaded tree under the directory in which I normally place 3rd party libraries:
  • [3rdParty]\
    • VTV\
      • CBuilder
      • Common
      • Contributions
      • Demos
      • Design
      • Packages
      • Resources
      • Source


1. In DXE2 I opened project group: ..\VTV\Packages\Delphi XE2\Delphi XE2.groupproj
  • I renamed the groupproj to VTVXE2 so that the filename reflects the component, but that's not necessary.
  • The group includes a runtime package and a designtime package. The designtime package is structured to call upon the runtime package. (So the runtime is the one to try building first.)
2. Heeding the comments in the issues list, I looked closely in the Project Manager tree at the build settings, and revised them to something sensible.
  • For each package:
    • Build: Debug
    • Target: 32-bit. This is because the bpl for the designtime package has to be used in the IDE, which is apparently 32-bit.
  • Set the RUNONLY and DESIGNONLY flags:
    • Project Options > Description > Usage options. I set this for all Target combo-box choices
      • VirtualTreesR: Runtime only.
      • VirtualTreesD: Designtime only.
  • I changed the suffix to "160" instead of the default "16". Not a necessary step, just a preference.
    • Project options > Description has a slot for LIB suffix. Note that there are separate settings for Target. If you set suffix at the "All configurations" level, this would be inherited by all configs. However, the 32-bit configs may have a setting ('16') that overrides this, so they need to be cleared.
    • There's a suffix setting in each of the dpk files. This seems to be the deprecated way of setting the suffix (it doesn't seem to respond to IDE UI settings), so I deleted this line in each dpk.
3. Compile
  • VirtualTreesR160.pbl
    • No errors. I checked the BPL directory to see that BPL was produced, and with correct name.
  • VirtualTreesD160.bpl
    • Again no errors, and a BPL was produced.

Testing and demo revisions

I proceeded to test the component with a couple of the supplied demo projects:
  • Minimal
    • Parameter error on VST OnGetText. I needed to revise the type of parameter Text from UnicodeString to System.string. (interface and implementation)
    • Project then compiled
    • Run
      • Startup OK
      • Adding nodes and manipulating the tree easily caused "Pending and direct clearance are mutual exclusive" assert exceptions. I came to the conclusion these are not related to XE2 per se, but some problem in the example.
  • Advanced
    • Fix: DrawTreeDemo.pas, line 463: DrawTextW(...) has a final parameter (False) which is apparently superfluous.
    • Project then compiled
    • Run: A quick test of each panel seemed to operate fine.