This preview shows page 1. Sign up to view the full content.
Unformatted text preview: press Enter anywhere in the execution group to execute the code: 304 • > > > > Chapter 9: Maplet User Interface Customization System mymaplet := Maplet ([ ["Hello World", Button("OK", Shutdown())] ]): Maplets[Display](mymaplet); In the following example, the Maplet application is written as two execution groups. The application must be deﬁned before using the Display command.
> > > > > with(Maplets[Elements]): my2maplet := Maplet ([ ["Hello World #2", Button("OK", Shutdown())] ]): Maplets[Display](my2maplet); 9.5 How to Close a Maplet Application If the Maplet application contains a cancel button, click Cancel. Otherwise, click the appropriate Close icon for your platform. For example: In UNIX: 1. Click the - icon in the upper left corner of the Maplet application window title bar. A drop-down list box appears. Note: The icon varies with window manager. 2. Select Close. In Windows: • Click the X icon in the upper right corner of the Maplet application window title bar. The Maplet application closes. 9.6 How to Work With Maplet Applications and the Maple Window (Modality) When a Maplet application is running, the Maple worksheet is inaccessible. If you move the cursor across the worksheet, an icon (clock in UNIX (depending on your window manager), hourglass in Windows) appears, indicating that the worksheet is inaccessible. The Maplet application must be closed or allowed to complete an action before the Maple worksheet can be accessed. 9.7 How to Activate a Maplet Application Window • 305 9.7 How to Activate a Maplet Application Window 1. Click an input ﬁeld in the Maplet application. The input ﬁeld appears highlighted. 2. Enter the appropriate expression, numbers, or text as required. 9.8 How to Terminate and Restart a Maplet Application With long computations, you may choose to stop the computation. 1. To terminate the current Maplet application process, click the X (or appropriate close icon for your platform) on the Maplet application title bar. 2. To restart the terminated application, run the Maplet application by using the lastmaplet tool.
> Maplets[Display](lastmaplet); 9.9 How to Use Graphical User Interface Shortcuts Drop-down List Boxes
Some Maplet applications contain drop-down list boxes. 1. Enter the ﬁrst character of any item in the list. The list automatically moves to an item that begins with the character entered. 2. Continue to enter the character until the desired selection is highlighted. Note that this shortcut does not apply to editable drop-down lists created with the ComboBox element. 306 • Chapter 9: Maplet User Interface Customization System SPACE BAR and TAB Key
You can use the mouse to click a Cancel or OK button in a Maplet application. You can also use the Tab key and Space Bar. 1. Using the Tab key, position the cursor at the Cancel or OK button. 2. Press the Space Bar. The command is entered. 9.10 Conclusion For more information on the Maplet User Interface Customization System, enter ?maplets at the Maple prompt or refer to the Maple Introductory Programming Guide. 9.11 General Conclusion This book aims to supply you with a good base of knowledge from which to further explore Maple. In this role, it focuses on the interactive use of Maple. Maple is a complete language and provides complete facilities for programming. The majority of Maple commands are coded in the Maple language, as this high-level, mathematica...
View Full Document