Type | Description | |||
Caption as String | A string expression that identifies the node's caption. The Caption supports built-in HTML tags. | |||
Image as Variant | A long expression that indicates the index of the icon being assigned to the node. | |||
Picture as Variant | A string expression that indicates the path to the picture file being loaded by the node, a IPictureDisp object that specifies the picture of the node |
Return | Description | |||
Node | A Node object being created. |
Use the AddAssistant method to add assistant nodes. An assistant node is displayed between a child node and its parent. The Node being returned by the AddAssistant method has the IsAssistant property on True. The control displays the assistant nodes only if the ShowAssistants property is True. An assistant node is displayed only if the parent node contains child nodes. By default, the control aligns the assistant nodes like follows: first assistant node is aligned to the left, the second assistant node is aligned to the right, the third assistant node to the left and so on. The Left property aligns the node to the left or right side of the link between child nodes and their parent. Use the Caption property to change the node's caption at runtime. Use the Assistant property to access the assistant nodes collection. Use the RemoveAssistant method to remove an assistant node. Use the PenLinkAssistant property to define the type of the pen used to paint the links between assistant nodes. Please not that an assistant node is shown between parent and child node, so if the node is not expanded, or has no childs, the assistant nodes are not shown.
The Caption parameter supports the following built-in HTML tags:
The control supports expandable HTML captions feature which allows you to expand(show)/collapse(hide) different information using <a ;exp=> or <a ;e64=> anchor tags. The exp/e64 field of the anchor stores the HTML line/lines to show once the user clicks/collapses/expands the caption.
Any ex-HTML caption can be transformed to an expandable-caption, by inserting the anchor ex-HTML tag. For instance, <solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3 shows the Header in underlined and bold on the first line and Line1, Line2, Line3 on the rest. The show lines is shown instead of Line1, Line2, Line3 once the user clicks the + sign.
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
In the following image, the red node represents an assistant node:
The following VB sample adds an assistant node to the root object:
Private Sub Form_Load() With ChartView1 .BeginUpdate With .Root .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" With .AddAssistant("Jhon Frederick<br><r>HR Secretary<br><fgcolor=0000FF><u>hr@exontrol.com</u></fgcolor><br>Tel:<r>+40-744-845288", 1) Left = False End With End With With .Nodes .Add "Child 1" .Add "Child 2" End With .EndUpdate End With End Sub
The following C++ sample adds an assistant node to the root object:
COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; CNode node = m_chartview.GetRoot(); CNode assistant = node.AddAssistant( "New Assistant", vtMissing, vtMissing ); assistant.SetBackColor( RGB(0,0,255) ); assistant.SetForeColor( RGB(255,255,255) );
The following VB.NET sample adds an assistant node to the root object:
With AxChartView1.Root With .AddAssistant("New Assistant") .ForeColor = ToUInt32(Color.White) .BackColor = ToUInt32(Color.Blue) End With End With
where the ToUInt32 function converts a Color expression to OLE_COLOR,
Shared Function ToUInt32(ByVal c As Color) As UInt32 Dim i As Long i = c.R i = i + 256 * c.G i = i + 256 * 256 * c.B ToUInt32 = Convert.ToUInt32(i) End Function
The following C# sample adds an assistant node to the root object:
EXORGCHARTLib.Node node = axChartView1.Root.AddAssistant("New Assistant", null, null); node.ForeColor = ToUInt32(Color.White); node.BackColor = ToUInt32(Color.Blue);
where the ToUInt32 function converts a Color expression to OLE_COLOR,
private UInt32 ToUInt32(Color c) { long i; i = c.R; i = i + 256 * c.G; i = i + 256 * 256 * c.B; return Convert.ToUInt32(i); }
The following VFP sample adds an assistant node to the root object:
with thisform.ChartView1.Root with .AddAssistant( "New Assistant" ) .ForeColor = RGB(255,255,255) .BackColor = RGB(0,0,255) endwith endwith