ClearGroup - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


DocumentTools[Canvas][Script]

  

ClearGroup

  

clear the elements from the active canvas group

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

ClearGroup()

Description

• 

The ClearGroup command removes the math and text contents of the active canvas group, leaving the group intact with a single empty math container inside.  Designate which group to clear by using the SetActive command prior to calling ClearGroup.

• 

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.

Examples

In this example, we will create a canvas, then use a script to change an entry and then clear the group.

Create a canvas with a group of items and a button that clears the group and then inserts new text

withDocumentTools:-Canvas

ClearGroup := proc(canvas)
   local sc := Script();
   SetActive(sc,"G");
   ClearGroup(sc);
   SetText(sc,"insert after clear");
   ToString(sc);
end proc:

cvNewCanvasTest ClearGroup,GroupTexttext,custom=T,1,2,3,custom=G,ScriptButtonClear Group,ClearGroup,position=500,60:

ShowCanvascv

Compatibility

• 

The DocumentTools:-Canvas:-Script:-ClearGroup command was introduced in Maple 2023.

• 

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

See Also

Annotate

GetMath

Script

SetActive

 


Download Help Document