Maplets[Tools] - Maple Programming Help

Maplets[Tools]

Parameters

 x - element opts - (optional) attribute(s) to add

Description

 • The AddAttribute(x, opts) calling sequence adds attributes to a previously constructed element.  This is an advanced feature.  No post-processing is performed. Therefore, shortcuts cannot be used.
 • The AddAttribute command must be used on constructed elements prior to a call to the Maplet command and can only be used directly on objects to which it is applied.

Examples

A Maplet application that has one label which, when clicked, exits.

 > $\mathrm{with}\left(\mathrm{Maplets}[\mathrm{Elements}]\right):$
 > $b≔\mathrm{Button}\left("Hello",'\mathrm{onclick}'='\mathrm{A1}'\right)$
 {b}{:=}{\mathrm{Elements:-com.maplesoft.maplets.elements.MButton}}{}\left({"onclick"}{=}{"REF"}{}\left({"A1"}\right){,}{"caption"}{=}{"Hello"}{,}{"enabled"}{=}{"true"}{,}{"halign"}{=}{"center"}{,}{"visible"}{=}{"true"}{,}{"valign"}{=}{"center"}\right) (1)
 > $\mathrm{Maplets}[\mathrm{Tools}][\mathrm{AddAttribute}]\left(b,'\mathrm{reference}'='\mathrm{B1}','\mathrm{color}'="#FF00FF"\right)$
 {\mathrm{Elements:-com.maplesoft.maplets.elements.MButton}}{}\left({"reference"}{=}{"B1"}{,}{"color"}{=}{"#FF00FF"}{,}{"onclick"}{=}{"REF"}{}\left({"A1"}\right){,}{"caption"}{=}{"Hello"}{,}{"enabled"}{=}{"true"}{,}{"halign"}{=}{"center"}{,}{"visible"}{=}{"true"}{,}{"valign"}{=}{"center"}\right) (2)