Close Window - Maple Help

Maplets[Elements]

 CloseWindow
 close a window in a Maplet application

 Calling Sequence CloseWindow(opts)

Parameters

 opts - equation(s) of the form window=value; specify options for the CloseWindow element

Description

 • The CloseWindow command element closes a window in a running Maplet application.
 • A window is a Maplet application element. A window should not be thought of as a Maplet application, but rather as one element within a Maplet application. A Maplet application can contain more than one window. Each window can contain many elements that control the layout and function of the window.
 • A CloseWindow element cannot contain other elements.
 • A CloseWindow 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 CloseWindow 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 x

 • The opts argument can contain one or more of the following equations that set Maplet application options.
 window = reference to Window element (name or string)
 The reference to the window to be closed.
 • 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 Classic Worksheet and Command-line interface, RunWindow displays a window, but it does not set a parent.  CloseWindow closes a window. For more information, see compatibility.

Examples

 > $\mathrm{with}\left(\mathrm{Maplets}\left[\mathrm{Elements}\right]\right):$
 > $\mathrm{maplet}≔\mathrm{Maplet}\left('\mathrm{onstartup}'='\mathrm{A1}',\mathrm{Window}\left['\mathrm{W1}'\right]\left("1",\left[\mathrm{Button}\left("Run New Window",\mathrm{RunWindow}\left('\mathrm{W2}'\right)\right),\mathrm{Button}\left("Exit",\mathrm{Shutdown}\left("1"\right)\right)\right]\right),\mathrm{Window}\left['\mathrm{W2}'\right]\left("2",\left[\mathrm{Button}\left("Close This Window",\mathrm{CloseWindow}\left('\mathrm{W2}'\right)\right),\mathrm{Button}\left("Exit",\mathrm{Shutdown}\left("2"\right)\right)\right]\right),\mathrm{Action}\left['\mathrm{A1}'\right]\left(\mathrm{RunWindow}\left('\mathrm{W1}'\right)\right)\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{maplet}\right)$