add attributes to an element - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Tools : Maplets/Tools/AddAttribute

Maplets[Tools][AddAttribute] - add attributes to an element

Calling Sequence

AddAttribute(x, opts)

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.

withMaplets[Elements]:

b:=ButtonHello,'onclick'='A1'

b:=Elements:-com.maplesoft.maplets.elements.MButtoncaption=Hello,onclick=REFA1,valign=center,visible=true,halign=center,enabled=true

(1)

Maplets[Tools]AddAttributeb,'reference'='B1','color'=#FF00FF

Elements:-com.maplesoft.maplets.elements.MButtonreference=B1,color=#FF00FF,caption=Hello,onclick=REFA1,valign=center,visible=true,halign=center,enabled=true

(2)

See Also

Maplets[Tools], Overview of Maplet Applications


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam