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

Online Help

All Products    Maple    MapleSim


DocumentTools[Canvas]

  

ScriptCheckBox

  

create a checkbox element for a canvas

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ScriptCheckBox(caption)

ScriptCheckBox(caption, options)

Parameters

caption

-

string

position

-

(optional) [x,y], or identical(below,right)

ischecked

-

(optional) truefalse

custom

-

string

Description

• 

The ScriptCheckBox command creates a canvas "checkbox" element, which, can be queried from the canvas during a button action.

• 

By default, ischecked = false

• 

The position option can be used to specify absolute coordinates for the location of the button on a canvas, or a relative position below or to the right of the previous component.

Examples

withDocumentTools:-Canvas:

testcheckbox := proc (canvas)
  local M;
  M := GetElements(canvas,"checkbox");
  local sc := Script();
  SetActive(sc,"out");
  SetText(sc,`if`(M[1]:-ischecked=true,"Checked","Not Checked") );
  ToString(sc);
end proc:

cvNewCanvasScriptCheckBoxCaption A,custom=A,Text,custom=out,ScriptButtonTest,testcheckbox:

ShowCanvascv

Compatibility

• 

The DocumentTools[Canvas][ScriptCheckBox] command was introduced in Maple 2022.

• 

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

See Also

Annotate

GetCanvas

GetMath

Math

NewCanvas

Script

ScriptButton

ShareCanvas

Text