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

Online Help

All Products    Maple    MapleSim


Maplets[Elements]

  

ToolBarButton

  

define a toolbar button

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ToolBarButton(opts)

ToolBarButton[refID](opts)

Parameters

opts

-

equation(s) of the form option=value where option is one of caption, enabled, image, onclick, or reference; specify options for the ToolBarButton element

refID

-

name or string; reference to the element

Description

• 

The ToolBarButton toolbar element defines a toolbar button in a Maplet application.

  

 

• 

The ToolBarButton element features can be modified by using options.  To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.

Elements, Symbols, or Types

Assumed Option or Content

 

 

Action or command elements

onclick option

refID

reference option

string or symbol

caption option

 

 

• 

A ToolBarButton element can contain Action or command elements to specify the onclick option and an Image element to specify the image option.

• 

A ToolBarButton element can be contained in a ToolBar element.

• 

The content of a ToolBarButton can be any number of ToolBarButton or ToolBarButtonItem descriptions, or in general, any element which extends the ToolBarButtonInterface.

• 

The following table describes the control and use of the ToolBarButton element options.

  

An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).

  

An x in the R column indicates that the option is required in the calling sequence.

  

An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.

  

An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.

Option

I

R

G

S

 

 

 

 

 

caption

x

x

x

x

enabled

x

 

x

x

image

x

 

 

 

onclick

x

x

 

 

reference

x

 

 

 

tooltip

x

 

x

x

 

 

 

 

 

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

caption = string or symbol

  

The caption that appears on the toolbar button.  By default, it is the string OK.

  

 

  

enabled = true or false

  

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

  

 

  

image = Image element or reference to an Image element (name or string)

  

An image on the toolbar button.

  

 

  

onclick = Action or command element, or reference to an Action element (name or string)

  

The action that occurs when the toolbar button is clicked.

  

 

  

reference = name or string

  

A reference to the ToolBarButton element.

  

If the reference is specified by both an index, for example, ToolBarButton[refID], and a reference in the calling sequence, the index reference takes precedence.

Examples

withMapletsElements:

mapletMapletWindowtitle=Integration w.r.t. x,toolbar=ToolBarToolBarButtonExit,Shutdown,ToolBarSeparator,ToolBarButtonDo It,onclick=EvaluateTF1=intTF1,x,TextFieldTF1,ButtonOK,ShutdownOK:

MapletsDisplaymaplet

See Also

int

Maplets/CommandElements

Maplets/ToolBarElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Action]

Maplets[Elements][Button]

Maplets[Elements][Evaluate]

Maplets[Elements][Image]

Maplets[Elements][Maplet]

Maplets[Elements][SetOption]

Maplets[Elements][Shutdown]

Maplets[Elements][TextField]

Maplets[Elements][ToolBar]

Maplets[Elements][ToolBarSeparator]

Maplets[Elements][Window]

Maplets[Tools][Get]

Maplets[Tools][Set]

Overview of Maplet Applications