Close - method of object PmiRoot
The method closes the panel window (removes it from the screen and the memory).
Close(sReason As String)
|sReason||(String) Panel closing procedure identifier. This value is transmitted into the pEvent.Reason parameter of the PmiRoot.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 PmiRoot.Close method sets the sReason parameter to, for example, "ok". The PmiRoot.onPanelStopEnd event it is possible to test this value and the correctly fill in the value PmiRoot.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.
For closing the window the PanelClose
permission has to be set.
The method is functional even for Web panels
. This method can be called, for example, in the onButtonUp
event of the PmiButton
graphic item (see Example
This method is used only for special cases. The window is usually closed automatically. In the PmWorkspace
, the window is closed when another window is opened in the same frame. Independent window is usually closed by the operator clicking the cross button in window header.
Closing the panel by a button in the panel. In the button (PmiButton
object) in the onButtonUp
event, there is the following script: