DocumentTools[Canvas][Script]
SetOption
set canvas or canvas element properties
Calling Sequence
Parameters
Description
Examples
Compatibility
SetOption(script,property,value)
script
-
DocumentTools:-Canvas:-Script object
property
string; property name
value
property value
The SetOption command allows you to set properties of the active canvas element and/or the entire canvas. The options set by this command only control script playback within the Maple Learn environment, and are invisible to operation within Maple.
The options that can be set are as follows:
Option
Value
Default
"ANGLE"
"RAD","DEG"
"RAD"
Set angles to radians or degrees
"DELAY"
0 .. 5000
200
Set delay between script commands in milliseconds
"ISTEXT"
truefalse
false
Toggle between Math and Text. In Text mode, content is not evaluated and no result or plot is displayed
"PLOT"
true
Enable/disable showing the current expression on the plot preview
"READONLY"
Enable/disable read-only setting on math container. If read-only is set, that also disables calculator results
"RESET"
Causes the document to be reset to the initial state
"RESULT"
Enable/disable showing the calculator result on the currently active math content
"SHOWERROR"
Enable/disable showing of error messages next to math cell
"SLIDER"
Enable/disable slider on currently active (math) content. Also has effect on any subsequently created math content
"SLIDER:INC"
numeric
1
The increment value is not currently used, except for deciding whether the slider is discrete (integer value) or continuous (float value)
"SLIDER:MAX"
10
Set the maximum endpoint of the slider for the currently active math content
"SLIDER:MIN"
-10
Set the minimum endpoint of the slider for the currently active math content
A "canvas" is an interactive section of a Maple document created by the NewCanvas command, or a shared web-based Maple Learn document. See the Script command for a more complete description.
with⁡DocumentTools:-Canvas:
sc≔Script⁡mode=Learn:
SetOption⁡sc,ANGLE,DEG
SetActive⁡sc,1:0
SetOption⁡sc,PLOT,true
SetActive⁡sc,1:1
SetOption⁡sc,SLIDER,true
SetOption⁡sc,SLIDER:MIN,0
SetOption⁡sc,SLIDER:MAX,360
SetActive⁡sc,1:2
SetActive⁡sc,1:3
SetActive⁡sc,1:4
cv≔NewCanvas⁡Unit Circle,Group⁡x2+y2=1,n&:=360,P&:=Point⁡cos⁡n,sin⁡n,Segment⁡Point⁡0,0,P,Segment⁡Point⁡cos⁡n,0,sc:
ShareCanvas⁡cv
The DocumentTools[Canvas][Script][SetOption] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
Math
NewCanvas
Script
SetActive
SetMath
SetText
Download Help Document