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

Online Help

All Products    Maple    MapleSim


DocumentTools[Actions]

  

ClickOnOff

  

programmatically perform the click action to select or de-select supported components

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ClickOnOff( id, opts)

Parameters

id

-

{string,symbol}; name of the component

select

-

(optional) truefalse; If no select option is provided by the user, the command will set the component to the opposite of its current state. Otherwise, select can explicitly set the component to true or false.

nowarning

-

(optional) truefalse; indicates whether a warning will appear when no Click Code is provided by the user for the component. The default is false.

Description

• 

The ClickOnOff command interacts with a component as if the user used the cursor to click the component.

• 

The command is only available for Check Box, Radio Button, and Toggle Button components.

• 

The Click Code is executed.

• 

This command has no return value.

Examples

Here we have a Toggle Button component that is set to act as a light switch and turn the lightbulb on and off. Executing the ClickOnOff command with select=true and select=false will act in the same manner as though the user clicked the Toggle Button.

 

You need to open the help page as a worksheet to view how executing the ClickOnOff command on the Toggle Button causes Click Code to turn the lightbulb on and off.

withDocumentTools:-Actions:

ClickOnOffToggleLight

ClickOnOffToggleLight

ClickOnOffToggleLight,select=false

ClickOnOffToggleLight,select

Compatibility

• 

The DocumentTools:-Actions:-ClickOnOff command was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

Check Box

DocumentTools

Embedded Components

Radio Button

Toggle Button