Type | Description | |||
String | A string expression that indicates the caption of the node. |
Use the Caption property to specify the node's caption. Use the Image property to assign an icon to a node. Use the Picture property to assign a custom size picture to a node. Use the Root property to get the root node. Use the Add method to add a new child node. Use the BeginUpdate and EndUpdate methods to maintain performance while adding new nodes to the control. Use the <img> HTML tag to insert icons inside the node's caption. Use the LinkCaption property to specify a caption on the line that links the parent with the current node. Use the EditNode to programmatically edit the giving node.
The Caption property supports built-in HTML format. The supported tags are:
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:
You can define the node's caption when calling the Add method.
With ChartView1.Root .Caption = "<r><dotline><b><fgcolor=0000FF>Andrew Fuller</fgcolor></b><br><solidline><b>Title</b>:<r><fgcolor=FF0000>Vice President Sales</fgcolor><br>USA, Tacoma, WA, 98401, 908 W. Capital Way<br><dotline><upline><b>Phone:</b><r>(206) 555-9482" End With
The above sample looks like following:
The following C++ sample changes the caption for the root node:
CNode root = m_chartview.GetRoot(); root.SetCaption( "new caption" );
The following VB.NET sample changes the caption for the root node:
With AxChartView1.Root .Caption = "new caption" End With
The following C# sample changes the caption for the root node:
EXORGCHARTLib.Node root = axChartView1.Root; root.Caption = "new caption";
The following VFP sample changes the caption for the root node:
with thisform.ChartView1.Root .Caption = "new caption" endwith