Is there a way to get the rectangle coordinates of the rectangle selected on the page with the Select Text Tool button on? That is, I press the Select Text Tool button, then with the mouse I click into the page and then move the mouse thereby creating a blue rectangle from my selection. When I release the mouse, I'd like to know the rectangle coordinates of what I just selected. Is there an event for this? and if so, what object gives me the Rect.
Thanks.
--Jeff
Mouse selection Rectangle
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Mouse selection Rectangle
Hello Jeff,
Basically, you will have to implement a custom event target for the PagesView, here's the sample on how yo use it:
https://gist.github.com/Polaringu/648a34daff6bd284a773
Furthermore you can search the forum for CustomEventTarget for some problem solutions that were solved.
Then by having this, you will have to listen for the WM_LBUTTONDOWN and WM_LBUTTONUP events when the https://sdkhelp.pdf-xchange.com/vie ... ActiveTool of the current document is a SelectText tool.
Cheers,
Alex
Basically, you will have to implement a custom event target for the PagesView, here's the sample on how yo use it:
https://gist.github.com/Polaringu/648a34daff6bd284a773
Furthermore you can search the forum for CustomEventTarget for some problem solutions that were solved.
Then by having this, you will have to listen for the WM_LBUTTONDOWN and WM_LBUTTONUP events when the https://sdkhelp.pdf-xchange.com/vie ... ActiveTool of the current document is a SelectText tool.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 211
- Joined: Sun Aug 05, 2012 5:20 pm
Re: Mouse selection Rectangle
Hi, hope not budding in, but very simple in VB6
930 ElseIf pEvent.ID = Me.PDF.Inst.Str2ID("e.annots.inserted") Then
Dim Annot As PDFXEditCtl.IPXC_Annotation
Dim myAnnEvent As PDFXEditCtl.IPXV_AnnotsEvent
940 Set myAnnEvent = pEvent
950 Set Annot = myAnnEvent.items.Item(myAnnEvent.items.count - 1)
960 If Not Annot Is Nothing Then
Debug.Print Annot.RECT.bottom
Debug.Print Annot.RECT.left
Debug.Print Annot.RECT.right
Debug.Print Annot.RECT.top
That's all there is too it.
ce
930 ElseIf pEvent.ID = Me.PDF.Inst.Str2ID("e.annots.inserted") Then
Dim Annot As PDFXEditCtl.IPXC_Annotation
Dim myAnnEvent As PDFXEditCtl.IPXV_AnnotsEvent
940 Set myAnnEvent = pEvent
950 Set Annot = myAnnEvent.items.Item(myAnnEvent.items.count - 1)
960 If Not Annot Is Nothing Then
Debug.Print Annot.RECT.bottom
Debug.Print Annot.RECT.left
Debug.Print Annot.RECT.right
Debug.Print Annot.RECT.top
That's all there is too it.
ce
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Mouse selection Rectangle
Hello Clifford,
From what I see this is a select text tool that does not add any annotations - I haven't tested this but I doubt that the e.annots.inserted event will be called.
Cheers,
Alex
From what I see this is a select text tool that does not add any annotations - I haven't tested this but I doubt that the e.annots.inserted event will be called.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 211
- Joined: Sun Aug 05, 2012 5:20 pm
Re: Mouse selection Rectangle
Sorry I didn't see the Select part of this, oh well
ce
ce
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Mouse selection Rectangle
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ