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:
Also, newer HTML format supports decorative text like follows:
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