I am intercepting the e_docSelection_changed event so that when the user selects a markup from the document it automatically selects the comment from my new comment grid, using the code below:
Code: Select all
Dim Doc As PDFXEdit.IPXV_Document = CType(e.pFrom, PDFXEdit.IPXV_Document)
Dim nLen As UInteger = e.pEvent.Param2
Dim buffer = New Integer(nLen - 1) {}
Dim ptr As IntPtr = New IntPtr(e.pEvent.Param1)
If nLen = 0 Then
' Deselect all rows as nothing is selected in the PDF document
MISData.Instance.frmDocDesigner.selectAnnotGridRow(-1)
Else
Marshal.Copy(ptr, buffer, 0, CInt(nLen))
For i As UInteger = 0 To nLen - 1
Dim docSel As PDFXEdit.IPXV_DocSelection = Doc.GetSelCluster(buffer(i))
Dim annotSel As PDFXEdit.IPXV_AnnotSelection = TryCast(docSel, PDFXEdit.IPXV_AnnotSelection)
If annotSel IsNot Nothing Then
If annotSel.Items.Count <> 0 Then
For annotCount As UInteger = 0 To annotSel.Items.Count - 1
Dim rowHandle As Integer = commonCode.GetRowHandleByColumnValue(MISData.Instance.frmDocDesigner.gridAnnotations, "annotOID", annotSel.Items(annotCount).Name)
If rowHandle <> -1 Then
MISData.Instance.frmDocDesigner.selectAnnotGridRow(rowHandle)
End If
Next
End If
End If
Next
End If
I was wondering if there is an event that is raised when a selected region is completed? If not is there a way that you can think of that I can get this executing correctly?
Thanks
Simon