KansasStateUniversity.TreeViewer2 is a class library for
displaying tree data structures from user programs. This library
is revision of a port of a portion of the JavaTM package edu.ksu.cis.viewer to the
Microsoft® .NET Framework. This revision redefines the
interface ITree to make it more consistent with .NET style.
The old version will continue to be maintained.
The current version (2.0) includes the following updates:
- (3/29/2010) A bug fix that now allows a
TreeForm to be displayed using its ShowDialog method
without the need to enable it first. It also includes
documentation that interfaces better with Microsoft Visual StudioŽ
and with the .NET Framework Class Library documentation.
- (3/15/2012) A new class, ScrollingTreePanel that has its
own scroll bars and works better for large images than an
auto-scrolling TreePanel. The TreePanel class
has also been modified so that it acts a view into a portion
of the TreeDrawing. Its initial size is large enough
to contain the entire drawing, but it can be resized and
scrolled (programmatically) to any pixel coordinates.
The remainder of this page describes how to install and use the
package on your own platform. A Microsoft Windows® operating
system or emulator with the Microsoft .NET Framework is required.
To install the library, simply download
KansasStateUniversity.TreeViewer2.dll and place it in a
In order to be able to implement a tree that can be displayed using
this library, you must write your tree class to implement ITree.
If you wish to have colored nodes, you will also need to provide a
class that implements IColorizer.
You may then use the TreeDrawing,
classes to display your tree.
For more details on using this library, you may download the class library documentation. If
you download this documentation using a Windows operating system,
when you open the file, you will get a Security Warning. In this
window, you will need to uncheck the box, "Always ask before
opening this file." If you don't uncheck this box, you will get a
message, "Navigation to the webpage was canceled", and you will
not see the documentation. If you get this message after
unchecking the box:
Online documentation is not available at this time.
To compile your program, you will need to instruct the compiler where
to find KansasStateUniversity.TreeViewer2.dll. If you are using
Studio®, you will need to go to the Solution Explorer and
- Close the program.
- Right-click on the TreeViewerDocs.chm (or
- Select "Properties".
- Click the "Unblock" button.
To compile a program from a command prompt, you will need to supply
the appropriate compiler option to instruct the compiler where to
find the library. For example, if you are writing a C# program
and the library is in the same folder as your source code, you
could compile your program as follows:
- right-click on "References";
- select "Add Reference...";
- click the "Browse" tab;
- navigate to KansasStateUniversity.TreeViewer2.dll; and
- click "OK".
csc /r:KansasStateUniversity.TreeViewer.dll *.cs
This library has not been tested on a wide variety of
platforms. If you discover compatibility issues or other bugs,
please let me know.
Last updated March 29, 2010.
Java is a trademark or
registered trademark of Sun Microsystems, Inc. in the United States
and other countries.
Microsoft, .NET, Windows, and Visual Studio are either registered
trademarks or trademarks of Microsoft Corporation in the United States
and/or other countries.