Skip to main content
Known Participant
December 20, 2022
Question

show a popup/tooltip when hovering over a text annotation (c/c++ sdk)

  • December 20, 2022
  • 2 replies
  • 557 views

A few questions today; looming deadlines with a list of things I haven't had success working out of docs, samples and experimentation...

 

I need to show a popup/tooltip when a user hovers over my annotation. the text in the annotation is a tick mark; a special character to denote something. the popyp shouldexplain what it denotes.

 

I have a AVAnnotHandlerCursorEnterProc and AVAnnotHandlerCursorExitProc wired up and working and the the text I need is in a string in the CosOnj that I retrieve successfully. I just need to know how to display it.

 

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
December 21, 2022

I agree with Test Screen, the simplest solution is to just draw on the screen.  I've used this method many times. Put the drawing code in screen redraw event to create a stable display, or  not if it's just a quick popup. 

Using actual windows adds more complexity than is necessary. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
December 20, 2022

I'd be inclined to implement the pop-up display simply using platform methods - write to the screen. When the info is no longer needed, cause a screen refresh by invalidating the affected area. If you can do the display by creating a floating window, all the redisplay should be taken care of when you remove it.