Close - method of the PmgRoot object
The method closes the panel window (removes it from the screen and the memory).
Empty Close(String sReason)
| sReason||(String) Panel closing procedure identifier. This value is transmitted into the pEvent.Reason parameter of the PmgRoot.onPanelStopEnd event.
This can be used, for example, if the panel is open as modal window (see How to work with modal windows). If the modal panel is closed by the "OK" button, the PmgRoot.Close method sets the sReason parameter to, for example, "ok". In the PmgRoot.onPanelStopEnd event it is possible to test this value and the correctly fill in the value PmgRoot.ReturnValue.
The value of this identifier can also be detected in the oExtra.onClose action defined when panel opens. In the method of this action the identifier is available in the oSystem.CloseReason parameter.
The method is executed only if the "PanelClose
" permission is fullfiled.
The method is functional even for Web panels
. This method can be called, for example, in the onButtonUp
event of the PmgButton
object (see Example
This method is used only for special cases. The window is usually closed automatically. In the workspace (in the PmaWorkspace
object), the window is closed if another window is opened in the same frame. Independent window is usually closed by the user by clicking the mouse on the cross button in window header.
Closing the panel by the button in the panel. In the button (PmgButton
object) in the onButtonUp
event, there is the following script: