Change mouse cursor when a button is clicked before adding an annotation

Product: Apryse PDFTron SDK
Product Version: 10.2.3

I have a button which sets custom author and names for a freetext annotation tool.
After setting the custom data I click on the PDF to add the annotation programatically.

I need to change the mouse cursor to ‘+’ symbol after I clicked the button which sets the custom data.
And change the cursor to normal pointer after I clicked on the PDF and the annotation is added.

1 Like

Thank you for posting your question to our forum. We will provide you with an update as soon as possible.

1 Like

Hi,

I am having a bit of difficulty understand what you mean, specifically by the following line:

After setting the custom data I click on the PDF to add the annotation programatically.

Can you let me know what platform you are using, i.e. WebViewer, Linux, Windows, Android, etc.

Can you also please provide some screenshots of what you are describing?

1 Like

Hello, thank you for replying.

I am using webViewer. I am recreating the functionality provided by PDFTron by default where I select the text annotation from the tool bar and place it wherever I want on the document by clicking left mouse button.

But I have a different button for selecting text annotation due to some design decisions and I want to change the cusor to “crosshair” after I select text annotation by clicking the custom button.

1 Like

Hello kmirsalehi,

Here’s a helpful forum post that I believe should help your use case: Change the cursor when one specific tool is active - #10 by dfelix

Essentially, in the constructor of the custom tool you are overriding the cursor property while the tool is equipped. In your case, the value of cursor would be “crosshair”.

Let me know if this helps!

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like