Method XbpCrt():setModalState() Foundation

Defines the XbpCrt window as "modal" or "non-modal".

Syntax
:setModalState( <nStatus> ) --> lSuccess
Parameters
<nStatus>
<nStatus> must be included and must be one of the constants defined in XBP.CH:
Constants for the modality of windows
Constant Description
XBP_DISP_MODELESS Window is not modal
XBP_DISP_APPMODAL Window is modal application wide
XBP_DISP_SYSMODAL *) Window is modal system wide
  1. Not supported by Windows
Return

This method returns the value .T. (true) if the window status could be set, otherwise .F. (false) is returned.

Description

The method :setModalState() sets the "modality" of the XbpCrt window. The user can leave a non-modal window at any time simply by clicking the mouse in another window. A modal window, however, must be closed before any other windows can be activated. The method :getModalState() can be used to determine the current modality of a window.

Specifying XBP_DISP_APPMODAL locks (disables) the owner of the window. This means that the parent and the owner must be different. If the parent and owner are the same, the parent is disabled. All children are also disabled and output to the window is no longer possible, because it is also a child of the disabled parent. However, the desktop window is an exception. It can be used for both parent and owner.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.