The control's release notes can be found on our web site, looking for the Release Notes column in the control's main page. Click here for direct link
The exPrint component uses the settings for default printer. Use your Control Panel/Printers to configure the settings for your default printer.
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:With ChartView1 .BeginUpdate .ZoomWidthMode = exControlSize .ZoomHeightMode = exControlSize .EndUpdate End With
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:Option Explicit Private Sub Form_Load() Dim i As Long Dim rs As Object, t As IPictureDisp Set rs = CreateObject("ADODB.Recordset") rs.Open "Select * From Employees", _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\sample.mdb", _ 3 With ChartView1 .BeginUpdate While Not rs.EOF() With .Nodes With .Add(getInfo(rs), rs("ReportsTo").Value, rs("EmployeeID").Value) .ToolTip = rs("Notes") + "<br><upline><dotline><r><b>" + _ rs("FirstName") + " " + rs("LastName") + "<b>" End With End With rs.MoveNext Wend .EndUpdate End With Exit Sub End Sub Private Function getInfo(ByVal r As Object) As String getInfo = r("TitleOfCourtesy") + " <b><fgcolor=000080>" + r("FirstName") + _ " " + r("LastName") + "</fgcolor></b><br>" + _ r("Title") + "<br><upline><dotline>" + _ r("City") + "<br> " + r("Address") End Function
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
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 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.
The connection between the nodes and their parent seems to be hidden on the left side. What I am doing wrong?
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:Also, you can use the Key property to change the node's key.Private Sub Form_Load() With ChartView1 .Nodes.Add "NewRoot", , "newRoot" .ExploreFromNode = "newRoot" .Nodes.Add "Child 1", "newRoot", "child_1" .Nodes.Add "Child 2", "newRoot", "child_2" End With End Sub
The LinkTo property links a node with any other nodes. The LinkTo property indicates the list of nodes separated by comma character.
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:
Is there any option to display the child nodes as a tree, so they are indented relative to the parent nodes?
Use the ArrangeSiblingNodesAs property on exTree, and so the child nodes are arranged as a tree, each child nodes is indented relative to the parent node.
The exception may occurs if not using the RuntimeKey as explained in the redist.txt file that was provided to you at the time you received the registration e-mail.
I was wondering what event is fired and what value is returned when the user moves a node and drops it as a child to another node. I need to update the underlying table used to generate the chart.
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
The Exontrol ExPrint component ( exprint.dll ) provides Print and Print Preview capabilities for the Exontrol ExOrgChart component.
Is there a way to calculate the hierarchical level of a node? root is level 1, all childs of root are at levels 2 etc?
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/Private Function Level(ByVal n As EXORGCHARTLibCtl.Node) As Integer Dim nLevel As Integer While Not n Is Nothing nLevel = nLevel + 1 Set n = n.Parent Wend Level = nLevel End Function