Copy link to clipboard
Copied
Hey everyone! I have recently made an interactive PDF that has a large amount of buttons and show/hide features, and one of the questions that the client has asked is if there is a way to prevent the 'selected button' box highlight from showing in the end. I think this must be a preference to one's own settings on their Acrobat, but I thought I would check here in case someone new? I don't even know what you would call that box other than button selection, so even searching for it is confusing to me. Here are some screenshots of what I am referring to. One shows the box around text (built into a button) and one shows the box around an icon serving as a button. I've also attached the Interactive PDF to the post in case you want to see it happen on your end.
Thanks for any info you can offer! I'm always referring to the forums, so if the answer exists, I'm confident you all can help.
Copy link to clipboard
Copied
The highlight stays there until a blur event (tabbing to another field or clicking anywhere else in the document). One way around this is to add the following Mouse Up action script:
this.getField("Text").setFocus();
With "Text" being the name of the next field you would want to the focus to go to.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The following script will turn it off:
app.focusRect=false;
However, it's not good practice to change someone's preferences using a form without warning them. You could obtain their preference, set focusRect to false on Mouse Enter, then return it to their preference on On Blur like this:
Mouse Enter Script
var focus=app.focusRect;
app.focusRect=false;
On Blur Script
app.focusRect=focus;
Copy link to clipboard
Copied
The highlight stays there until a blur event (tabbing to another field or clicking anywhere else in the document). One way around this is to add the following Mouse Up action script:
this.getField("Text").setFocus();
With "Text" being the name of the next field you would want to the focus to go to.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Actually, I found where, or at least what option I found will work. Thanks so much! Problem solved!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now