Maplets[Elements]
RunWindow
display a window
Calling Sequence
Parameters
Description
Examples
RunWindow(opts)
opts
-
equation(s) of the form window=value; specify options for the RunWindow element
The RunWindow command element displays a window defined in the running Maplet application. To display a window defined in a different Maplet application, use the Display function.
There are separate RunDialog and RunWindow command elements because the Window element is intrinsically different from the dialog elements. A dialog has a predefined structure. A Maplet application author can specify options for a dialog, but cannot add elements. A window does not have a predefined structure. A Maplet application author specifies its structure by using elements and options. Also they behave differently. For example, a window can be minimized.
To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.
Elements, Symbols, or Types
Assumed Option or Content
name or string
window option
A RunWindow element cannot contain other elements.
A RunWindow element can be contained in a Maplet element; in an equation for the onapprove, oncancel, onchange, onclick, ondecline, or onstartup option for an element; or wrapped in an Action element as a parameter in an element that accepts an onchange or onclick option without an equation.
The following table describes the control and use of the RunWindow element options.
An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
An x in the R column indicates that the option is required in the calling sequence.
An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.
Option
I
R
G
S
window
x
The opts argument can contain one or more of the following equations that set Maplet application options.
window = reference to a Window element (name or string)
A reference to the window to run.
Note: In the Standard Worksheet, RunWindow displays a window and sets its parent to be the window that is currently running and enabled. If there are no other windows running, then the window does not have a parent. CloseWindow closes a window and also closes its child windows. In the Command-line interface, RunWindow displays a window, but it does not set a parent. CloseWindow closes a window. For more information, see compatibility.
In this Maplet application, RunWindow displays a Window element defined in the same Maplet application.
with⁡MapletsElements:
maplet≔Maplet⁡onstartup=A1,WindowW1⁡title=Differentiation and Integration,layout=BL0,BoxLayoutBL0⁡BoxColumn⁡BoxRow⁡Select a method,BoxRow⁡Button⁡Differentiation,Action⁡CloseWindow⁡W1,RunWindow⁡W2,Button⁡Integration,Action⁡CloseWindow⁡W1,RunWindow⁡W3,WindowW2⁡title=Differentiation,Enter an expression:,TextFieldTF1⁡,Button⁡Differentiate with respect to x,Evaluate⁡TF1=diff⁡TF1,x,Button⁡Exit,Shutdown⁡TF1,WindowW3⁡title=Integration,Enter an integrand:,TextFieldTF2⁡,Button⁡Integrate with respect to x,Evaluate⁡TF2=int⁡TF2,x,Button⁡Exit,Shutdown⁡TF2,ActionA1⁡RunWindow⁡W1:
MapletsDisplay⁡maplet
In this Maplet application, Display displays Window elements defined in Maplet applications different from the running Maplet application.
maplet≔Maplet⁡onstartup=A1,WindowW1⁡title=Select Tutorial,layout=BL1,BoxLayoutBL1⁡BoxColumn⁡BoxRow⁡Select a tutorial,BoxRow⁡Button⁡Differentiation,Evaluate⁡function=MapletsDisplay⁡maplet2,Button⁡Integration,Evaluate⁡function=MapletsDisplay⁡maplet3,BoxRow⁡Button⁡Exit,Shutdown⁡,ActionA1⁡RunWindow⁡W1:
maplet2≔Maplet⁡WindowW2⁡title=Differentiation Practice,layout=BL2,BoxLayoutBL2⁡BoxColumn⁡BoxRow⁡Enter an expression:,TextFieldTF1⁡,BoxRow⁡,BoxRow⁡After manually calculating the derivative, check your answer by clicking the Differentiate button.,BoxRow⁡Button⁡Differentiate with respect to x,Evaluate⁡TF1=diff⁡TF1,x,Button⁡Return to Main Menu,Shutdown⁡:
maplet3≔Maplet⁡WindowW3⁡title=Integration Practice,layout=BL3,BoxLayoutBL3⁡BoxColumn⁡BoxRow⁡Enter an integrand:,TextFieldTF2⁡,BoxRow⁡,BoxRow⁡After manually calculating the anti-derivative, check your answer by clicking the Integrate button.,BoxRow⁡Button⁡Integrate with respect to x,Evaluate⁡TF2=int⁡TF2,x,Button⁡Return to Main Menu,Shutdown⁡:
See Also
Maplets/CommandElements
Maplets/DialogElements
Maplets[Display]
Maplets[Elements][Action]
Maplets[Elements][BoxColumn]
Maplets[Elements][BoxLayout]
Maplets[Elements][BoxRow]
Maplets[Elements][Button]
Maplets[Elements][Evaluate]
Maplets[Elements][Maplet]
Maplets[Elements][RunDialog]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][TextField]
Maplets[Elements][Window]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
Download Help Document