Auto Close (AutoClose)

Window property of a form that determines what happens when it loses input focus. It may be automatically closed and the Quit or Accept trigger fired , or it may stay open and be explicitly closed. Valid values: Quit or True, Accept , or False.

Valid Values
Value Description
Quit | Q | True The Quit trigger is fired and the popup form is automatically closed. This trigger is typically used to close the form without storing unsaved changes. For more information, see trigger quit.
Accept | A The Accept trigger is fired and the popup form is automatically closed. This trigger is typically used to validate and store unsaved changes. For more information, see trigger accept.
False The popup form does not close automatically; it must be explicitly closed.

In this case, ensure that user can close the form in some way, for example, using a command button or programming the Form's loseFocus trigger.

Usage

Dynamic? No
Dependencies:

Applicable only if Window Type is Popup

If the AsynchGui initialization setting is 2 (Flush), it is not possible to activate a popup form that has its Auto Close property set to True.

Description

When set to Quit or Accept , the specified trigger is fired if either of the following occurs:

  • The popup form's anchor field loses input focus.
  • The popup form is in a cascading chain of popup forms and it loses focus to a popup form higher in the chain. In this case all popup forms below the form with focus are closed.

    The popup form does not close if it activates a child popup form, which then gets focus.

Popup forms are often used in situations where you want to display or gather a limited amount of data (for example, in a ribbon bar or super tooltip).

Setting AutoClose=Accept makes it possible to use multi-line widgets in which the Enter key is used to insert a new line.

Popup forms can also be used to create a type of popup menu, in which one popup form can activate another. In this case, the parent does not close when the child popup form gets focus. However when a popup form that is higher in the chain gets focus, all popup windows below the form with focus are closed.

If you set Auto Close to False, ensure that user can close the form in some way, for example, using a command button or programming the loseFocus trigger.

Setting in ProcScript

The following code displays a popup form with a title bar and close button.

;DETAIL trigger of FLD1
newinstance DETAIL_FRM, "Details", "windowtype=popup;caption=true;close=true;autoclose=false;InheritWinProps=false"
activate "Details"

Applies To

Popup Window