Type | Description | |||
ID as Variant | An Unique identifier that specifies the ID of the note being added. Use this identifier to access later the node or the box. | |||
Item as Variant | A long expression that specifies the handle of the item where the note is assigned. The ItemFromPoint property retrieves the handle of the item from the cursor. | |||
Key as Variant |
A VARIANT expression that specifies the object to relate the note as
follows:
By default, the starting part of the note is not visible, so only the ending part of the note is visible. | |||
Text as String | A String expression that specifies the HTML text to be displayed on the ending part of the note. The Text parameter supports HTML tags as well as Chart Tags such as <%dd%> that displays the day in 2 digits, and so on like described bellow. Use the Images method to specify a list of icons that can be displayed in the control using the <img> tag. Use the HTMLPicture property to add custom- size pictures to be used in the HTML captions using the <img> tag. |
Return | Description | |||
Note | A Note object being created. Use the NoteFromPoint property to access the Note from the cursor. |
The Text parameter / PartText property supports the following:
The following tags are displayed based on the user's Regional and Language Options:
The Text parameter / PartText property 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:
The following VB sample adds a note associated with the DATE from the cursor, when the user double clicks the chart area:
Private Sub G2antt1_DblClick(Shift As Integer, X As Single, Y As Single) With G2antt1 .BeginUpdate Dim h As Long, c As Long, hit As HitTestInfoEnum h = G2antt1.ItemFromPoint(-1, -1, c, hit) If (h <> 0) Then Dim d As Date d = .Chart.DateFromPoint(-1, -1) If (d <> 0) Then .Chart.Notes.Add d, h, d, "<b><%dd%></b>/<%mm%>/<%yyyy%>" End If End If .EndUpdate End With End Sub
The following VB sample adds a note associated with the BAR from the cursor, when the user double clicks the chart area:
Private Sub G2antt1_DblClick(Shift As Integer, X As Single, Y As Single) With G2antt1 .BeginUpdate Dim h As Long, c As Long, hit As HitTestInfoEnum h = G2antt1.ItemFromPoint(-1, -1, c, hit) If (h <> 0) Then Dim k As Variant k = .Chart.BarFromPoint(-1, -1) If (Not IsEmpty(k)) Then .Chart.Notes.Add k, h, k, "start" End If End If .EndUpdate End With End Sub