Difference between revisions of "VirtualTreeview"

From Lazarus wiki
Jump to navigationJump to search
 
(20 intermediate revisions by 11 users not shown)
Line 2: Line 2:
  
 
=== About ===
 
=== About ===
VirtualTreeview is a treeview control built from ground up.
+
VirtualTreeview is a [[TTreeView]] control built from ground up.
  
 
Its main characteristics are :
 
Its main characteristics are :
Line 14: Line 14:
 
* Hot style for nodes is supported  
 
* Hot style for nodes is supported  
 
* Nodes can have individual heights  
 
* Nodes can have individual heights  
* Sorting via compare callback
+
* Sorting via compare [[callback]]
 
* Support for unicode
 
* Support for unicode
 
* Multiple columns are supported  
 
* Multiple columns are supported  
Line 32: Line 32:
 
   
 
   
 
=== Download ===
 
=== Download ===
The new releases can be found at
+
See the project [https://github.com/blikblum/VirtualTreeView-Lazarus/releases releases page]
[http://sourceforge.net/projects/lazarus-ccr/files/VirtualTreeView%20(New%20Port) Lazarus CCR]
 
  
The old releases can be found at [http://sourceforge.net/projects/lazarus-ccr/files/Virtual%20Treeview/ Lazarus CCR].
+
Note that v5.5.3.1 is included in Lazarus v2.0+, there is not need for a separate download. However, to avoid naming conflicts, a "laz" prefix was added to package, unit and components:
  
=== SVN ===
+
{| class="wikitable"
you can checkout the actual source from<br>
+
!  || Official version || Lazarus version
 +
|-
 +
| '''Package''' || virtualtreeview_package.lpk || laz.virtualtreeview_package.lpk
 +
|-
 +
| '''Main unit'''  || virtualtrees.pas || laz.virtualtrees.pas
 +
|-
 +
| '''Components''' || TVirtualStringTree <br/> TVirtualDrawTree <br/> TVTHeaderPopupMenu || TLazVirtualStringTree <br/> TLazVirtualDrawTree <br/> TLazVTHeaderPopupMenu
 +
|}
  
https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/virtualtreeview-new/
+
=== Repository ===
 +
You can checkout the source code from [https://github.com/blikblum/VirtualTreeView-Lazarus GitHub]
  
commandline to do this is
+
It's possible to use both Subversion and Git clients
  
  svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/virtualtreeview-new/
+
Subversion:
 +
  svn co https://github.com/blikblum/VirtualTreeView-Lazarus/branches/lazarus-v5
 +
 
 +
Replace lazarus_v5 by lazarus_v4 or lazarus_master to get a different version. For more info how to use Subversion, see [https://help.github.com/articles/support-for-subversion-clients/ GitHub help]
 +
 
 +
Git:
 +
git clone https://github.com/blikblum/VirtualTreeView-Lazarus.git
  
 
=== Bug report / Feature request ===
 
=== Bug report / Feature request ===
  
[http://bugs.freepascal.org Bug Tracker] project Lazarus-CCR, category Virtual Treeview
+
[https://github.com/blikblum/VirtualTreeView-Lazarus/issues Here]
 +
 
 +
For patches / pull requests, [https://github.com/blikblum/VirtualTreeView-Lazarus/pulls here]. Newcomers to GitHub may want to read the [https://help.github.com/articles/using-pull-requests/ help]
  
 
=== Change Log ===
 
=== Change Log ===
 +
* 02/06/2016 - [http://forum.lazarus.freepascal.org/index.php?topic=32856.0 4.8.7 R4 and 5.5.3 R1] - First release of 5x branch + moved to GitHub
 
* 20/10/2012 - [http://www.lazarus.freepascal.org/index.php/topic,18640.0.html 4.8.7 LCL R2] - Compatibility with Lazarus 1.0 + 64 bit support
 
* 20/10/2012 - [http://www.lazarus.freepascal.org/index.php/topic,18640.0.html 4.8.7 LCL R2] - Compatibility with Lazarus 1.0 + 64 bit support
 
* 18/02/2011 - [http://www.lazarus.freepascal.org/index.php/topic,12172.msg62067.html 4.8.7 LCL R1] - Sync with 4.8 branch + misc fixes
 
* 18/02/2011 - [http://www.lazarus.freepascal.org/index.php/topic,12172.msg62067.html 4.8.7 LCL R1] - Sync with 4.8 branch + misc fixes
Line 56: Line 72:
  
 
=== Dependencies / System Requirements ===
 
=== Dependencies / System Requirements ===
* FPC 2.6.x
+
Versions 4.x or 5.x
* Lazarus 1.0 or newer
 
* LCL Extensions 0.5 (http://code.google.com/p/luipack/downloads/list)
 
  
Status: Stable
+
*Lazarus 1.6 or newer
Tested on Windows, Linux.
+
*fpc 2.6.4 or newer
Needs testing on MacOS.  
+
*LCL Extensions 0.6 or newer
  
==== Known Issues ====
+
Version 6.x (lazarus_master branch)
* The scroll bar does not work on OSX 10.8.6. See forum post about branch 4.8: http://www.lazarus.freepascal.org/index.php/topic,12172.0.html
+
 
 +
*Lazarus 1.6 or newer
 +
*fpc 3.1 (trunk) or newer
 +
*LCL Extensions 0.6 or newer
  
 
=== Installation ===
 
=== Installation ===
 +
* In Lazarus v2.0+ the virtualtreeview package is installed by default. Note, however, that everything has been renamed with a "laz" prefix (see [[#Download|above table]]) to avoid possible naming conflicts. It is subsequently assumed that you want to install one of the github versions in addition to the built-in version.
 
* If new to Lazarus, read [[Install Packages]]
 
* If new to Lazarus, read [[Install Packages]]
* Extract the LCL Extensions package to a directory (lazarus\components\lclextensions or other of your preference)
+
* In Lazarus v2.0 or older, uninstall the built-in version first: go to "Package" > "Install/uninstall packages", select "virtualtreeview_package 5.5.3.1" in the ''left'' list, click "Uninstall selection" and "Save and rebuild IDE". Note: This is not required in Lazarus v2.2 or newer.
* Extract the Virtual Treeview package to a directory (lazarus\components\virtualtreeview or other of your preference)
+
* Download the LCL Extensions package and extract it to a directory (lazarus\components\lclextensions or other of your preference).
 +
* Download the Virtual Treeview package and extract it to a directory (lazarus\components\virtualtreeview or other of your preference).
 
* Open lclextensions_package.lpk in LCL Extensions directory and click "Use / Add to project"
 
* Open lclextensions_package.lpk in LCL Extensions directory and click "Use / Add to project"
* Open virtualtreeview_package.lpk in Virtual Treeview and click "Use / Install". Rebuild the IDE
+
* Open virtualtreeview_package.lpk in the package editor and click "Use / Install". Rebuild the IDE.
  
 
=== Help ===
 
=== Help ===
 +
A comprehensive help file in .chm format(*) can be found within the GIT repository [https://github.com/blikblum/VirtualTreeView-Lazarus] in the subdirectory ''Help''.<br>
 +
A tutorial and numerous code samples can be found in this forum [[VirtualTreeview Example for Lazarus]], in the ''Demos'' Subdirectory of the VirtualTreeView GIT [https://github.com/blikblum/VirtualTreeView-Lazarus], and in the SVN of freepascal.org [https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/examples/virtualtreeview/?root=lazarus]<br>
  
Can be found at [http://www.soft-gems.net/index.php/controls/virtual-treeview VirtualTreeview Main Page] (search for ''help in chm format'').
+
(*)Beginning with Windows 7, additional security measures were introduced for .chm Files, if you either download a .chm file directly via the browser (without going through a .zip file), or open the file from a network drive. The lock causes the problem that after opening the .chm file you will see only the table of contents, while the actual contents are missing. To manually release the lock use the Windows Explorer (Right Mouse Click - Properties - "Unblock"). This works with Windows 10 (4/2021) as well.
 
+
== See also ==
Example code can be found here: [[VirtualTreeview Example for Lazarus]]
+
* [[TTreeView]]
  
 
[[Category:Components]]
 
[[Category:Components]]
 +
[[Category:Lazarus]]
 +
[[Category:Lazarus-CCR]]

Latest revision as of 11:46, 10 February 2022

Deutsch (de) English (en) español (es) français (fr) polski (pl)

About

VirtualTreeview is a TTreeView control built from ground up.

Its main characteristics are :

  • it is extremely fast. Adding one million nodes takes only ~700 milliseconds
  • very small memory foot print. by only allocating about 60 bytes per node
  • optimized for high speed access. It takes as few as 0.5 seconds to traverse one million nodes
  • Multiselection is supported
  • Drawing the entire tree to a bitmap or the printer is supported
  • fixed background image can be used
  • Hot style for nodes is supported
  • Nodes can have individual heights
  • Sorting via compare callback
  • Support for unicode
  • Multiple columns are supported
  • ... and many more

This component was designed for cross-platform applications.

Anivt.gif

Author

Author: Mike Lischke
Old LCL Port: Joerg Thaler,Christian Ulrich
New LCL Port: Luiz Américo

License

LGPL or Mozilla Public Licence 1.1

Download

See the project releases page

Note that v5.5.3.1 is included in Lazarus v2.0+, there is not need for a separate download. However, to avoid naming conflicts, a "laz" prefix was added to package, unit and components:

Official version Lazarus version
Package virtualtreeview_package.lpk laz.virtualtreeview_package.lpk
Main unit virtualtrees.pas laz.virtualtrees.pas
Components TVirtualStringTree
TVirtualDrawTree
TVTHeaderPopupMenu
TLazVirtualStringTree
TLazVirtualDrawTree
TLazVTHeaderPopupMenu

Repository

You can checkout the source code from GitHub

It's possible to use both Subversion and Git clients

Subversion:

svn co https://github.com/blikblum/VirtualTreeView-Lazarus/branches/lazarus-v5

Replace lazarus_v5 by lazarus_v4 or lazarus_master to get a different version. For more info how to use Subversion, see GitHub help

Git:

git clone https://github.com/blikblum/VirtualTreeView-Lazarus.git

Bug report / Feature request

Here

For patches / pull requests, here. Newcomers to GitHub may want to read the help

Change Log

  • 02/06/2016 - 4.8.7 R4 and 5.5.3 R1 - First release of 5x branch + moved to GitHub
  • 20/10/2012 - 4.8.7 LCL R2 - Compatibility with Lazarus 1.0 + 64 bit support
  • 18/02/2011 - 4.8.7 LCL R1 - Sync with 4.8 branch + misc fixes
  • 11/02/2010 - 4.8.6 - First stable release of the new port

Dependencies / System Requirements

Versions 4.x or 5.x

  • Lazarus 1.6 or newer
  • fpc 2.6.4 or newer
  • LCL Extensions 0.6 or newer

Version 6.x (lazarus_master branch)

  • Lazarus 1.6 or newer
  • fpc 3.1 (trunk) or newer
  • LCL Extensions 0.6 or newer

Installation

  • In Lazarus v2.0+ the virtualtreeview package is installed by default. Note, however, that everything has been renamed with a "laz" prefix (see above table) to avoid possible naming conflicts. It is subsequently assumed that you want to install one of the github versions in addition to the built-in version.
  • If new to Lazarus, read Install Packages
  • In Lazarus v2.0 or older, uninstall the built-in version first: go to "Package" > "Install/uninstall packages", select "virtualtreeview_package 5.5.3.1" in the left list, click "Uninstall selection" and "Save and rebuild IDE". Note: This is not required in Lazarus v2.2 or newer.
  • Download the LCL Extensions package and extract it to a directory (lazarus\components\lclextensions or other of your preference).
  • Download the Virtual Treeview package and extract it to a directory (lazarus\components\virtualtreeview or other of your preference).
  • Open lclextensions_package.lpk in LCL Extensions directory and click "Use / Add to project"
  • Open virtualtreeview_package.lpk in the package editor and click "Use / Install". Rebuild the IDE.

Help

A comprehensive help file in .chm format(*) can be found within the GIT repository [1] in the subdirectory Help.
A tutorial and numerous code samples can be found in this forum VirtualTreeview Example for Lazarus, in the Demos Subdirectory of the VirtualTreeView GIT [2], and in the SVN of freepascal.org [3]

(*)Beginning with Windows 7, additional security measures were introduced for .chm Files, if you either download a .chm file directly via the browser (without going through a .zip file), or open the file from a network drive. The lock causes the problem that after opening the .chm file you will see only the table of contents, while the actual contents are missing. To manually release the lock use the Windows Explorer (Right Mouse Click - Properties - "Unblock"). This works with Windows 10 (4/2021) as well.

See also