Alex,
I have just noticed something with my code for my custom contextmenu.
1. If I right click on the document NOT over any annotation, my contextmenu is displayed. This is CORRECT
2. If I right click over some annotation that is selected then the below menu is displayed. This is CORRECT
3. If I right click over some annotation that is NOT selected then the below menu is displayed. I do not want to display this menu, but the menu from option 2.
4. If I right click on the annotation element in the comment pane then my menu is displayed. I do not want this, I want to display your standard annotation menu.
Below is the code that I am using, could you please assist me with trying to acheive this.
Code: Select all
Public Sub OnEvent(pSender As PDFXEdit.IUIX_Obj, pEvent As PDFXEdit.IUIX_Event) Implements PDFXEdit.IUIX_ObjImpl.OnEvent
If pEvent.Code = CInt(&H204) Then
Dim pt As PDFXEdit.tagPOINT
pt.x = pEvent.Pos.x
pt.y = pEvent.Pos.y
Dim screenPt As PDFXEdit.tagPOINT
Dim nHitTestCode As Integer = 0
Dim annot As PDFXEdit.IPXC_Annotation = Parent.docPreview.Doc.ActiveView.PagesView.GetAnnotFromPt(pt, nHitTestCode)
If annot IsNot Nothing Then
pEvent.Handled = True
Else
pSender.ClientPtToScreen(pt, screenPt)
' Custom context menu
Parent.RadialMenu1.ShowPopup(New Point(screenPt.x, screenPt.y))
End If
End If
End Sub
Thanks in advance
Simon