DocumentTools[Canvas][Script]
SetCheckBox
set the value of a checkbox
Calling Sequence
Parameters
Description
Examples
Compatibility
SetCheckBox(script,custom,property,value)
script
-
DocumentTools:-Canvas:-Script object
custom
string; the custom property of the checkbox
property
string; the name of the property to set
value
the value of the property
The SetCheckBox command sets the specified property of the given ScriptCheckBox. Unlike math and text containers, the SetActive command is not used as a precursor to this command. Instead, the custom property of the checkbox is used to identify the checkbox to change. If there is more than one checkbox with the same custom property, only the first found will be updated.
In this example there are two buttons that control the visibility of the first checkbox.
withDocumentTools:-Canvas:
mkvis := proc(canvas) local sc:=Script(); SetCheckBox(sc,"cb1","visible",true); ToString(sc); end:
mkinvis := proc(canvas) local sc:=Script(); SetCheckBox(sc,"cb1","visible",false); ToString(sc); end:
cv≔NewCanvasScriptCheckBoxcheck,custom=cb1,ScriptButtonMake Visible,mkvis,ScriptButtonMake Invisible,mkinvis,ScriptCheckBoxdistractor,custom=cb2:
ShowCanvascv,entrybox=false
The DocumentTools[Canvas][Script][SetCheckBox] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
GetMath
Script
ScriptCheckBox
SetActive
Download Help Document