Message Boards Message Boards

1
|
8134 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Constructing palette that replaces selection with link to documentation

Posted 10 years ago
POSTED BY: W. Craig Carter
4 Replies

I would like to additionally point out that if there is a Function name in a text or Section cell and one places the cursor in or just after it, or if it is selected, then the F1 key or the "Find selected Function" item in the Help menu will bring up the relevant Help page.

Thank you David and Mohamad,

David's suggestion works for the problem I had in mind: I am constructing student notebooks with text cells and wish to build in links to the documentation where I discuss a particular function.

POSTED BY: W. Craig Carter

Try this Craig.

generateWRILink[] :=
 Module[{routineName, buttonText, button},
  routineName = NotebookRead[EvaluationNotebook[]];
  buttonText = "paclet:ref/" <> routineName;
  button = 
   ButtonBox[routineName, BaseStyle -> "Link", 
    ButtonData -> buttonText];
  NotebookWrite[EvaluationNotebook[], button]
  ]

Button["Make Link", generateWRILink[]]

Hello,

You can try this method. First run the code:

Framed[DisplayForm[ButtonBox["HistogramList", BaseStyle -> "Link", ButtonData -> "paclet:ref/HistogramList"]]]

then:

1) Select the output cell

2) Open Palettes button

enter image description here

this is example palette that I have created

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract