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
Sample Maplet Application: Show Table
This worksheet demonstrates how to write Maplet applications that function similarly to the Show Table Maplet application available in the Maplets[Examples] package. It is designed for experienced Maple authors.
The ShowTable Maplet application displays a window with a nested list in table format.
Simple Maplet Application
The following Maplet application creates a window with a table that displays values of sin(x) for x between 0 and 6.2.
# Invoke the Maplets Elements subpackage. with( Maplets[Elements] ):
# Define the Maplet application. maplet := Maplet( # The BoxLayout element structures the Maplet application # window into three rows. The BowLayout element # ensures that the rows are equidistant. [ "Values of the sine function:", # The TableLayout element creates a matrix-like # layout. Each row of the TableLayout element # contains: Table( ["x", "sin(x)"], [seq( [evalf[3](i/10), evalf[3](sin(i/10))], i = 0..62 )] ), # The OK button shuts down the Maplet application Button( "OK", Shutdown() ) ] ): # Display runs the Maplet application. Maplets[Display](maplet):
Note: This Maplet application lacks a title, the width is too narrow, and the OK button may not be visible. To improve this Maplet application, read the following Further Refinements section.
Further Refinements
To refine the Maplet application:
1. Add a title to the Maplet application.
2. Change the width.
3. Place the scroll bar on the BoxCell, not on the Table.
4. Change the font and color of the text.
By default, one window is used in the first example. To add a title, the layout must be wrapped in a Window element.
Similarly, the text "Values of the sine function" must be wrapped in a Label element, and the Table element wrapped in a BoxCell element, each with appropriate attributes.
maplet := Maplet( # The BoxLayout element structures the Maplet application # window into three rows. The BowLayout element # ensures that the rows are equidistant. Window( 'title' = "The Sine Function", [ Label( "Values of the sine function:", 'foreground' = COLOR(RGB, 1, 1, 0 ), 'font' = Font("helvetica", 14) ), BoxCell( 'vscroll' = 'as_needed', Table( 'width' = 200, ["x", "sin(x)"], [seq( [evalf[3](i/10), evalf[3](sin(i/10))], i = 0..62 )] ) ), Button( "OK", Shutdown() ) ] ) ): # Display runs the Maplet application. Maplets[Display](maplet):
Maplets[Examples][ShowTable]
The Maplets[Examples][ShowTable] function displays a similar Maplet application to that of the previous examples.
For help on this Maplet application, see:
?Maplets[Examples][ShowTable]
To view the source code, enter:
print( Maplets[Examples][ShowTable] );
See Also
Maplets/Examples, Maplets[Elements][Table]
Return to Index for Example Worksheets
Download Help Document