Shortcut Component - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Shortcut Component

insert an icon in a worksheet or document

 

Description

Component Palette Image

Shortcut Properties

Valid Link Targets

Shortcut Component Examples

Description

• 

The shortcut component displays a caption, as well as an image, and can be used as a hyperlink to various types of content, including help pages, MapleCloud documents, and URLs.

• 

The shortcut component is customized by setting options in the Shortcut context panel. To display the Shortcut context panel, click the embedded component. Actions are associated with components using routines in the DocumentTools package.

• 

You can click the shortcut component to execute a line of code.  To do this, select Maple code as the Link Target.

• 

The Name property is used to reference the component when using routines from the DocumentTools package.

Component Palette Image

Shortcut Properties

• 

The following table describes the control and use of the shortcut component options:

  

An x in the Get column indicates that the option can be read, that is, retrieved by using the DocumentTools[GetProperty] tool.

  

An x in the Set column indicates that the option can be written, that is, set by using the DocumentTools[SetProperty] tool.

  

 

Option

Get

Set

Option Type

caption

x

x

string

enabled

x

x

true or false

image

 

x

name or string

linktarget

x

x

string

pixelheight

x

x

positive integer

pixelwidth

x

x

positive integer

tooltip

x

x

string

type

x

 

string

usespecifiedsize

x

x

true or false

usespecifiedwidth

x

x

true or false

visible

x

x

true or false

visiblecharacterwidth

x

x

positive integer

  

 

  

caption 

  

The text that appears in the shortcut component. By default, the value is Shortcut.

  

enabled 

  

Whether the component is enabled. If enabled is set to false, the component is dimmed and any action associated with it cannot be initiated. By default, the value is true.

  

image 

  

The image that appears on the shortcut component.

  

linktarget 

  

The hyperlink target.

  

pixelheight 

  

The height of the image in pixels.

  

pixelwidth 

  

The width of the image in pixels.

  

tooltip 

  

The text that appears when the user hovers the mouse over the shortcut component.

  

type 

  

The type of the component. This returns "Shortcut".

  

usespecifiedsize 

  

Whether the specified size of the image is used. By default, the value is true.

  

usespecifiedwidth 

  

Whether the specified character width is used. By default, the value is false.

  

visible 

  

Specifies if the shortcut component is visible. By default, the value is true.

  

visiblecharacterwidth 

  

The number of characters that appear in the caption. This option only applies when useSpecifiedwidth is set.

Valid Link Targets

Valid link targets are given in the following table:

Link Target Type

Link Target

linktarget for SetProperty or GetProperty

linktarget example

Worksheet File

pathname to worksheet file

Wks:<filename>

Wks:c:/mytest.mw

Help Topic

help topic name

Help:<help topic>

Help:int

Task

task name

Task:<task name>

Task:BezierCurves

MapleCloud

numeric id from URL copied from the MapleCloud

Cloud:<numeric id>

Cloud:4520928

URL

URL to open in web browser

any http or https URL

http://www.maplesoft.com

New Document

title of new Maple document

Newdoc:<document name>

Newdoc:my new document

New Worksheet

title of new Maple worksheet

Newwks:<worksheet name>

Newwks:my new worksheet

Maple code

one line of valid Maple code

Mpl:<maple code>

Mpl:a:=2+2;

Workbook Attachment

URI of file copied from Workbook Explorer palette.

<URI of workbook file>

maple://mydata.xlsx

Workbook File

pathname to workbook file

Wks:<filename>

Wks:c:/mytest.maple

 

Shortcut Component Examples

  

Note: To interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.

  

In this example, we'll make a link to a MapleCloud document.

  

To insert the components and set the caption for the shortcut component:

1. 

Insert a Shortcut component using the Components palette. For information on displaying the Maple palettes, see the Show Palettes help page.


Shortcut

2. 

Go to the MapleCloud and click Generate Sharing Link ( ) for the document you want to link to.  

Alternatively, right-click the document and select Copy Link to Clipboard.

3. 

Click the Shortcut component to display the context panel.

4. 

In the Link Target field, select MapleCloud from the drop-down box and paste the ID from the URL into the text field.
For example, if the link is https://maple.cloud/app/4523951/Lines+-+The+Devil+Is+in+the+Details paste 4523951 into the text field

To try the Shortcut component:

• 

Click the Shortcut component that you have inserted. The worksheet that it links to is downloaded from the MapleCloud and opened in a new tab.

 


Shortcut

  

 

See Also

DocumentTools

DocumentTools[GetProperty]

DocumentTools[SetProperty]

EmbeddedComponents

MapleCloud