Shortcut Component - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Document Tools : Embedded Components : ShortcutComponent

Shortcut Component

Insert an icon in a Standard Maple 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

URL copied from the MapleCloud or numeric id

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.

  

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 palette, right-click on an entry and select Copy shareable link.

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 URL 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