method Notes.Remove (ID as Variant)
Removes a specific note/box from the collection.

 TypeDescription 
   ID as Variant A VARIANT expression that specifies the identifier of the Note to be removed.  
Use the Remove method to remove a specific Note in the collection. Use the Add method to add new notes to the chart area. The Clear method removes all notes in the control. Use the ShowNotes property to show or hide the notes in the control. Use the Visible property to show or hide a specific note, or use the PartVisible property to specify whether the start or ending part of the note is visible or hidden. The ShowLink property specifies whether the link between parts of the notes is visible or hidden.  Use the NoteFromPoint property to access the note from the cursor.

The following VB sample removes the note being double clicked:

Private Sub G2antt1_DblClick(Shift As Integer, X As Single, Y As Single)
    With G2antt1
        .BeginUpdate
        Dim n As EXG2ANTTLibCtl.Note
        Set n = .Chart.NoteFromPoint(-1, -1)
        If Not n Is Nothing Then
            .Chart.Notes.Remove n.ID
        End If
        .EndUpdate
    End With
End Sub

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.