Skip to main content
Inspiring
May 19, 2020
Answered

How to create hover text over a dropdown item in an Adobe PDF

  • May 19, 2020
  • 1 reply
  • 2329 views

I'd like some hover text to appear over a dropdown item when a user is deciding to slelect it.

 

A purely hypothetical example.

Say my item list is "next day", "2 day","next week" for shipping opitions.

 

However, when a user goes down the dropdown list I would like a text box to pop up with few details on that item to help them make a choice.  For example, with the mouse over "next day" it may say "You will have the option later of choosing from next day USPS Mail, UPS or FedEx, but only DHL outside the US"

 

 

This topic has been closed for replies.
Correct answer Thom Parker

If the arrow keys are used to move up and down the list then you could do something. Otherwise it is not possible, there is no event for the mouse moving over a list entry.  

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
May 19, 2020

If the arrow keys are used to move up and down the list then you could do something. Otherwise it is not possible, there is no event for the mouse moving over a list entry.  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
XML1979Author
Inspiring
May 20, 2020

Thanks Thom,

What could be done if arrow keys are used?  And is this a special list or field set up?

Thom Parker
Community Expert
Community Expert
June 1, 2020

In order to display some kind of hover text for an item, there has to be an event trigger that indicates when that item is in the focus. The user moving the mouse over the items does not produce any events. But the arrow keys actually make selections, so they trigger Keystroke events. Use the keystroke event to display hover text. Unfortunately there is no location information available for the list item, so the hover text can't be displayed next to the highlighted item. It's a bit of an unfortunate situation, because while there are no events for the mouse passing over the list items, there is location info for the mouse. It's a situation where both things exist, you just can't have them at the same time 😞 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often