It depends on how much text would be needed. I'd suggest using a button, and the Mouse Up event, to do something like:
app.alert("Message goes here.\rThis is the second line.\r\rThis is the fourth line.", 3);
Much easier than a custom dialog. You mentioned using a read-only text field, but read-only fields can't be interacted with by the user, so they can't be used to trigger actions.
For more text than will reasonably fit in an alert dialog, your idea of using a separate document is good. I'd suggest including it as a file attachment and set up the document so it opens in a new window with the toolbars and menus not showing, and include a button to close the document. There are a number of details in setting this up, so post again if you'd like more info.
Yes, George.....thanks. I'll have to rethink the trigger mechanism...perhaps a small button ?
I love the idea of a file attachment...that way only a single file is needed.
So the attachment is actually the help file in PDF format then.
So what I need is the logic to detect if it's been opened for the first time, if not, open it up.
If it's been opened, then bring that window to the front, and go to the bookmark that is specified.
That's the basic logic.
You don't need any logic. You just need to set the Mouse Up trigger of the button to use a "Go to a page view" action that links to location in the attached PDF that you want. If it's already opened, it can't open a second instance, and it will have the focus.
Nice ! Now.....Is there any way to scroll the bookmark to the top of the page view ?
In other words, if the bookmark is half-way on the page, I want the last half of the page to show.
Set the view (scroll/zoom) to whatever you want before clicking the "Set link" button.
Thanks. Just as a test for my idea of using a caption as an a click event handler,
I changed one of the text field properties to "Locked"....and strangely I could still enter and change the text in that field !!
Is that a bug ? This was Acrobat Pro XI (11.0.07).
When you select the Locked check box, it just prevents edits to the field properties, location, size, etc. It doesn't prevent the user from interacting with the field. If a field is set to read-only or is hidden, then the user won't be able to interact with it.
Strangely that is quite different from MS Access forms where Locked prevents data entry, yet events can still fire.
I think Adobe made a mistake on this one.
Is there a problem using a button? A button can be configured to have no visible appearance.
Interesting thought George. Can I put the button "on top" of the captioned text ?
In other words, is there a "z-order" setting somewhere or "bring to front" setting ?
However, (and Yikes !), there appears to be no "Tag" property.
That omission forces me to use a strict field naming convention to be able to isolate caption text fields.
Yes, the tab order defines the z-order as well.
George - I got it to work by keeping the button in front of the caption and setting it to visible with no fill, no borders
However, only the Mouse Down event handler would fire...not the Mouse Up. This would happen only if I tabbed to the button.
If I hovered over it and clicked, nothing happened because it appears the captioned text got the focus instead.
It appears I need to set the Focus to the button when the text field is entered.
Also I could not set a Goto PageView into a different document
On top of all of that, it appears impossible to scroll down to a bookmark in the middle of a page.
Finally, a Word 2010 document's bookmarks were not recognized by Acrobat XI even though the settings in the Word Acrobat Addin had the checkmark for this option.
Wow, this has been an exercise in frustration.
Exactly how did you add the caption text? Is it a type of form field, text comment, something else? Normally it would be regular text on a page and some some type of interactive element, so it wouldn't be able to receive the focus.
Regarding setting up a go to view action to another document, it is certainly possible. If you describe how you've tried and provide more information on what part isn't working, it would help.
I don't know what you mean when you say "a Word 2010 document's bookmarks were not recognized by Acrobat XI". Can you elaborate?