8.6.1.2 Adding Hyperlinks to Text Labels
Hyperlink-TextLabel
Origin supports various types of hyperlinks in text labels. The syntax for links is as follows:
- range://: indicates a range inside the project.
- http:// or https://: indicates an external link.
- help://: indicates a link to the Origin help documentation.
- note://: indicates a link to a Notes window.
In each case, the link is put into the text box in the object Properties Programming tab (Alt+double click on the text label) while the displayed text is put into the text box on the Text tab (Double-click). The text label will be underlined indicating that it is a hyperlink.
A text label can also be made into a button that performs some action when clicked. See Examples 3 and 4 for instructions.
Example 1. Range link
- Enter the following in a graph's text label:
- Go to column 1, row 100
- Right-click on the text label and select Properties... from the context menu and go to Programming tab in the dialog.
- Enter the following in the script box at the bottom of the dialog and click OK.
range://[book1]sheet1!col(1)[100]
- Click on the text label to open Book1, Sheet1 and have it scroll to the cell in column 1, row 100.
Note: the link will do nothing if the destination range doesn't exist.
Example 2. External link
- Enter the following in a graph's text label:
- originlab.com
- Right-click on the text label and select Properties... from the context menu and go to Programming tab in the dialog.
- Enter the following in the script box and click OK.
- http://www.originlab.com
- Click on the label to open a browser to the OriginLab's home page.
Example 3. Linked Help file page button
- Enter the following in a graph's text label:
- Click to see the Spacing tab help file
- Right-click on the text label and select Properties... from the context menu and go to Programming tab in the dialog.
- Enter the following in the script box, making sure to enclose the link in double-quotes:
run -LK "help://origin.chm/UserGuide/The_(Plot_Details)_Spacing_Tab.html"
- Set Script,Run After to Button Up, and click OK.
- Press the button to open the Origin CHM to "The (Plot Details) Spacing tab" page.
Example 4. Linked Notes window button
- Creat a new Notes window Notes1
- Enter the following in a graph's text label:
- Go to Notes1
- Right-click on the text label and select Properties... from the context menu and go to Programming tab in the dialog.
- Enter the following in the script box, making sure to enclose the link in double-quotes:
run -LK "notes://Notes1"
- Set Script,Run After to Button Up, and click OK.
- Press the button to go to the Notes1 window.
Note: the button will do nothing if the specified Notes window doesn't exist.
Refer to this page to see more examples.