The ExOrgChart component permits the totally automatic generation of organigrams. An organigram generally provides a clear picture of the hierarchical position of the various actors. The ExOrgChart control shows a hierarchical display of nodes, each one having an HTML caption, pictures and icons aligned to any side of the node.

The ZoomWidth property specifies a value indicating how large the chart will appear on horizontal axis.
The ZoomWidthMode property specifies a value that indicates whether the ZoomWidth property is updated when the control is resized.
The following sample resizes the chart to fit the client's area:

The Nodes.Add method inserts a node to the chart.
For instance, using ADO, you can load a hierarchical table, if your
table contains a field that identifies the key of the record ( "EmployeeID"
), and a field that holds the key to the parent record ( "ReportsTo"
), like in the following sample:

Yes, the Exontrol ExPrint component ( exprint.dll ) provides Print
and Print Preview capabilities for the exOrgChart component. Once that
you can have the exPrint component in your Components list, insert a new
instance of "ExPrint 1.0 Control Library" to your form and add
the following code:

Private Sub Command1_Click()
With Print1
Set .PrintExt = ChartView1.Object
.Preview
End With
End Sub

The Exontrol Print Preview mainframe looks like follows:

The exPrint component is free of charge, if you are
registered user of the exOrgChart component.

Yes. The exOrgChart component provides WYSWYG
Template/Layout Editor that helps you to initialize the control at
design mode. In design mode, select 'Properties' item from object's
context menu. A template file is a collection of instructions that
control loads at runtime. In other words the template file holds a
collection of properties and their values, methods and objects, into a
TEXT file. The template file combines XML style with something close to
VBScript. We call it X-Script. It is important to specify that the
editor and the X-Script DO NOT USE any external VB script engine, Active
script engine, XML parser or DOM. The X-Script was implemented from
scratch as lite as possible to let users customize the control in design
mode no matter what programming languages they are using. The template
files are the same for any programming language, and do the same thing
for all! For instance, you can copy and paste the template file from a
VFP control to a C++ control! The editor automatically updates the
control's look and feel while you are editing the template file. This
way you can learn easy how a property or a method reacts! Also, the
editor provides a type library context menu that helps you to find
quickly a property ( CTRL + SPACE invokes it )

The following template loads nodes at design mode:

BeginUpdate
Root
{
ForeColor = RGB(0,0,255)
BackColor = RGB(255,255,0)
Caption = "<r><dotline><b>CObject</b><br>CObject is the principal base class for the Microsoft Foundation Class Library.<br><upline><dotline>Methods:<r>4"
Image = 1
}
Nodes
{
Add("<r><dotline><b>CCmdTarget</b><br>CCmdTarget is the base class for the Microsoft Foundation Class Library message-map architecture.<br><upline><dotline>Methods:<r>14",,"target")
{
ForeColor = RGB(0,0,255)
BackColor = RGB(255,255,0)
}
Add("<r><dotline><b>CWnd</b><br>This class provides the base functionality for all window classes in MFC.<br><upline><dotline>Methods:<r>18","target","wnd")
Add("<r><dotline><b>CControlBar</b><br>CControlBar is the base class for the control-bar classes CStatusBar, CToolBar, CDialogBar, CReBar, and COleResizeBar.<br><upline><dotline>Methods:<r>18","wnd","cb")
Add("<r><dotline><b>CDialogBar</b><br>The CDialogBar class provides the functionality of a Windows modeless dialog box in a control bar.<br><upline><dotline>Methods:<r>18","cb","db")
Add("<r><dotline><b>CDialog</b><br>This class provides the base functionality for all dialog classes in MFC.<br><upline><dotline>Methods:<r>18","wnd","dialog")
Add("<r><dotline>Exceptions<br>Exceptions occur when a program executes abnormally because of conditions outside the program's control.",,"exceptions")
Add("<r><dotline>Graphichal Drawing Objects<br>Windows provides a variety of drawing tools to use in device contexts.",,"gdi") .Width = 255
Add("<r><dotline>Syncronization<br>Classes that use arrays can also implement their own synchronization using the SyncRoot property..",,"sync")
}
EndUpdate

The user can copy the control's content to the
clipboard by pressing the CTRL + C key. For instance, if you want to
include the control's content to a Microsoft Word document, you have to
copy the control's content and paste it in the document. Use the Copy
method to programmatically copy the control's content to the cliboard.

By default, the control provides properties like BorderWidth
property and BorderHeight
property to specify the size of the borders inside the control's client
area. Please make sure that BorderWidth property is not 0. If it is 0 it
is possible that the link between the nodes and their parent to be
hidden depending on the nodes content.

By default, the control's Root
has no key associated. Thought you can add a new node as child of the
root object and to use the ExplorerFromNode
property to assign a new displayed root. The following sample displays a
new root for your control:

The control provides the SaveXML
method that saves the control's data to XML document. Use the LoadXML
method to load XML documents saved using the SaveXML method. The SaveXML
method may save data to a file , an XML document object, or a custom
object that supports persistence like described here:

String - Specifies the file name. Note that this must be a file
name, rather than a URL. The file is created if necessary and the
contents are entirely replaced with the contents of the saved
document. For example:

Custom object supporting persistence - Any other
custom COM object that supports QueryInterface for IStream,
IPersistStream, or IPersistStreamInit can also be
provided here and the document will be saved accordingly. In the IStream
case, the IStream::Write method will be called as it saves
the document; in the IPersistStream case, IPersistStream::Load
will be called with an IStream that supports the Read,
Seek, and Stat methods

Use the <a> anchor element in Caption
property of the Node,
or when inserting a node using the Add
method. The control fires the AnchorClick
event when the user clicks an anchor element. Use the ShowToolTip
property to programmatically show a tooltip for specified anchor
element.

You need to store the node from cursor using NodeFromPoint property during LayoutStartChanging event and update the node's new Parent property in LayoutEndChanging
event as shown in the following VB sample:

Private sNode As EXORGCHARTLibCtl.Node
Private Sub ChartView1_LayoutStartChanging(ByVal Operation As EXORGCHARTLibCtl.LayoutChangingEnum)
If (Operation = exMoveNode) Then
Set sNode = ChartView1.NodeFromPoint(-1, -1)
End If
End Sub
Private Sub ChartView1_LayoutEndChanging(ByVal Operation As EXORGCHARTLibCtl.LayoutChangingEnum)
If (Operation = exMoveNode) Then
If Not (sNode Is Nothing) Then
Debug.Print "The current node moved to " & sNode.Parent.Caption
End If
Set sNode = Nothing
End If
End Sub

On, (Fit-To-Page) the control's content is printed to a single page
( version 6.1 )

p%, (Adjust-To) where p is a positive number that indicates the
percent from normal size to adjust to. For instance, the "FitToPage =
50%" adjusts the control's content to 50% from normal size. ( version
8.1 )

w x, (Fit-To Wide) where w is a positive number that indicates that the control's content fits w pages wide by
how many pages tall are required. For instance,
"FitToPage = 3 x" fits the control's content to 3 pages wide by
how many pages tall is are required. ( version
8.1 )

x t, (Fit-To Tall) where t is a positive number that specifies
that the control's content fits t pages tall by how many pages wide are
required. For instance,
"FitToPage = x 2" fits the control's content to 2 pages tall by
how many pages wide are required. ( version
8.1 )

The Parent property of the Node returns the node's parent if exists or nothing
if the node is the root object or has no parent. The following sample uses the
Parent property to calculate the node's level/