DocumentTools[Actions]
ClickOnOff
programmatically perform the click action to select or de-select supported components
Calling Sequence
Parameters
Description
Examples
Compatibility
ClickOnOff( id, opts)
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.
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.
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.
with⁡DocumentTools:-Actions:
ClickOnOff⁡ToggleLight
ClickOnOff⁡ToggleLight,select=false
ClickOnOff⁡ToggleLight,select
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
Download Help Document