Opening a Dialog Box

Alpha Five supports two types of dialog boxes.

This topic discusses standard forms that are opened as Dialog boxes.

A dialog box is a form that has been opened as a dialog box. The key difference between a normal form and a dialog box is that a dialog box is modal. That means that you cannot click on any object outside the dialog box until the dialog box is closed. You can only open a form as a dialog box using Xbasic or Action Scripting. You cannot open a form as a dialog box from the Control Panel.

An Xbasic script that opens up a dialog box will pause until the dialog box is closed. Once the dialog is closed, the script will resume execution.

There are four ways to open a form as a dialog:

For example, the following script shows how a dialog box can be opened, and a new record entered into the dialog:

:Form.load("Customer","Dialog")

'The script will continue to execute

:customer.new_record()

:customer.show()    

The script will now pause. The dialog is automatically activated when it is shown.

Typically, when you design a form that will be opened as a dialog box, you will want to set the following form properties so that the form looks like a standard Windows dialog box:

  1. Select the background of the form and right click.

  2. Click Properties....

  3. On the Form tab, check Hide status bar.

  4. On the Window tab, clear Sizeable, Minimize button, and Maximize button.

See Also

Form Functions and Methods, Closing a Dialog Box