1. Technology

Virtual Tree View - How To Install - Delphi 3rd Party Open Source Component


1 of 3

Virtual TreeView - About
Virtual Tree View - Sample In Action
Virtual Tree View - Sample In Action
Any tree view like component's purpose is to display a hierarchical list of items. A most common one you use and see every day is the one used in Windows Explorer - to display folders (and more) on your file system.

Delphi comes with the TTreeView control - located on the "Win32" section of the tool palette. Defined in the ComCtrls unit, the TTreeView does a decent task of allowing you to present any parent-child relation of any type of objects.

Each node in the TTreeView consists of a label and an optional bitmapped image - and the TTreeNode object describes an individual node in a TTreeView control.

While powerful enough for most of the tasks if your application is based on displaying hierarchical data, like folders and files, XML structure, any anything alike, you would soon realize that you need more power from a tree view like component.

This is where one gem of the 3rd party components world comes to the rescue: the Virtual TreeView component.

Virtual TreeView

The Virtual TreeView, initially being developed by Mike Lischke and now being maintained as an open source project on Google Code is a must-use control if you are up to working with whatever you could call "nodes".

With more than 13 years spend in development, the Virtual TreeView is one of the most polished, flexible and advanced open source components for the Delphi market.

Never mind the Delphi version you are using from Delphi 7 to the latest version (XE3 at the moment) you would be able to use and leverage the power of the TVirtualStringTree and TVirtualDrawTree (the actual names of the controls) in your applications.

Here are just a few "why to use" features of the Virtual TreeView control:

  • very small memory foot print.
  • super fast.
  • virtual - meaning it does not know about the data it manages - only the size. Everything is done via events.
  • supports multi-column views
  • easy customization of a node display with bitmaps and font styles.
  • drag'n drop and clipboard support
  • each node in the tree can have its own check type (even mixed tri-state partial checking).
  • sophisticated tree content serialization.
  • edit tree data using application defined editors.
With this article I'm starting a series on how-to style articles around using the TVirtualStringTree control. I've already done two (more advanced ones): Need More Images For A Virtual Tree View Node? and Passing a Simple Type Variable (Integer) for a Pointer Parameter.

For the start, let's see how to install the Virtual TreeView in Delphi's IDE.

  1. About.com
  2. Technology
  3. Delphi
  4. Using VCL Components
  5. TTreeView
  6. Virtual Tree View - Delphi 3rd Party Open Source Component - How To Install

©2014 About.com. All rights reserved.