Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
DocumentTools[SetProperty] - Set property of an embedded component
Calling Sequence
SetProperty(id, attr, val, refreshopt)
Parameters
id
-
name ; name of embedded component
attr
name ; property of the component that is to be set
val
(optional) anything ; value of property to set
refreshopt
expression of the form refresh = value, where value is true or false; specifies whether or not to immediately update the document
Description
The SetProperty function sets the value of a property of an embedded component.
If the val option is omitted, the referenced component is reset to its default value.
By default, when this command is invoked from inside the code which is executed as the action of another embedded component, the document is not updated until that code terminates. The option refresh = true (or just refresh) can be used to force the document to update during the call to SetProperty.
For a list of embedded components, see Overview of Embedded Components.
Examples
Suppose that your document has a slider component with the name Slider1. To set the position of this slider to th of its maximum (assuming the range is the default of 0..100) , you can do this:
Suppose your document has a plot component with the name Plot0. To display a single plot in the component, use the following commands.
To display an array of plots in the plot component, you must force the array to stay unsimplified by referring to it with quotes. See the specific component help page for any other special input instructions.
If code attached to a button causes several other embedded component values to change, you would normally not want the document to update until all those changes have been made. If you want to force updating after each change, use the refresh = true option (which can be abbreviated as just refresh). For example the following code illustrates updating a series of ComboBox elements. It is assumed that this code is attached to a Button component.
See Also
Button, ComboBox, DocumentTools, DocumentTools[Do], DocumentTools[GetProperty], Overview of Embedded Components
Download Help Document