Type | Description | |||
Part as NotePartEnum | A NotePartEnum expression that specifies the part being visible or hidden. | |||
Boolean | A Boolean expression that specifies whether the indicated part is visible or hidden. |
The following VB sample adds a note associated with the DATE being double clicked:
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 With .Chart.Notes.Add(d, h, d, "") .PartVisible(exNoteEnd) = False .PartVisible(exNoteStart) = True .PartText(exNoteStart) = "<%dd%><br><%mm%>" .PartFixedWidth(exNoteStart) = G2antt1.Chart.UnitWidth .PartFixedHeight(exNoteStart) = 36 .PartShadow(exNoteStart) = True End With End If End If .EndUpdate End With End Sub
Use the Visible property to show or hide the entire note. Use the ShowNotes property to show or hide the notes in the control. Use the Remove method to remove a note from the Notes collection.