Difference between revisions of "CloseWindow"
(category) |
|||
Line 1: | Line 1: | ||
[[category:User-interface functions]] | [[category:User-interface functions]] | ||
− | |||
− | == CloseWindow( obj, windowType ) == | + | == CloseWindow(obj, windowType) == |
Closes a window in the Analytica user interface. | Closes a window in the Analytica user interface. | ||
Line 8: | Line 7: | ||
* «obj» is an identifier. | * «obj» is an identifier. | ||
* «windowType» is one of the following: | * «windowType» is one of the following: | ||
− | + | : <code>"Diagram"</code>: Closes the [[Diagram window]] for Module «obj». | |
− | + | : <code>"Object"</code>: Closes the [[Object window]] for «obj». | |
− | + | : <code>"Result"</code>: Closes the [[Result Tables and Graphs|Result window]] for «obj». «Obj» should be a variable. | |
− | + | : <code>"EditTable"</code>: Closes the [[Table|edit table]] window for «obj». | |
− | + | : <code>"Outline"</code>: Closes (hides) the [[Outline window]]. The «obj» parameter is ignored. | |
− | + | : <code>"Typescript"</code>: Closes the [[Typescript Window]]. The «obj» parameter is ignored. | |
There is no meaningful return value. | There is no meaningful return value. | ||
Line 25: | Line 24: | ||
== Examples == | == Examples == | ||
− | |||
Close the diagram for Module Mo2 | Close the diagram for Module Mo2 | ||
− | :<code>CloseWindow(Mo2,"Diagram")</code> | + | :<code>CloseWindow(Mo2, "Diagram")</code> |
Close the [[Object window]] for Va1 | Close the [[Object window]] for Va1 | ||
Line 33: | Line 31: | ||
Close the [[Outline window]] (note: «obj» ignored, so can be anything) | Close the [[Outline window]] (note: «obj» ignored, so can be anything) | ||
− | :<code>CloseWindow(Null,"Outline")</code> | + | :<code>CloseWindow(Null, "Outline")</code> |
+ | |||
+ | ==History== | ||
+ | Introduced in [[Analytica 4.7]]. | ||
== See Also == | == See Also == | ||
− | |||
* [[ShowWindow]]() | * [[ShowWindow]]() |
Revision as of 00:23, 21 January 2016
CloseWindow(obj, windowType)
Closes a window in the Analytica user interface.
- «obj» is an identifier.
- «windowType» is one of the following:
"Diagram"
: Closes the Diagram window for Module «obj»."Object"
: Closes the Object window for «obj»."Result"
: Closes the Result window for «obj». «Obj» should be a variable."EditTable"
: Closes the edit table window for «obj»."Outline"
: Closes (hides) the Outline window. The «obj» parameter is ignored."Typescript"
: Closes the Typescript Window. The «obj» parameter is ignored.
There is no meaningful return value.
Notes
If you use this to close the last open window, not counting the typescript window, it will close the model. The user will be asked whether he wishes to save any changes if any changes have occurred.
The function fails quietly, meaning that it does not issue an error if the requested window is not open, or if you tell it to close a diagram for a non-module, a result for a non-variable, etc. Error messages are issued when the «obj» parameter does not identify an existing object or «windowType» is not a recognized value.
The function is usually used in a button's OnClick event expression.
Examples
Close the diagram for Module Mo2
CloseWindow(Mo2, "Diagram")
Close the Object window for Va1
CloseWindow(Va1, "Object")
Close the Outline window (note: «obj» ignored, so can be anything)
CloseWindow(Null, "Outline")
History
Introduced in Analytica 4.7.
Enable comment auto-refresher