5.2 Modal versus modeless

A dialog box can be either modal or modeless.

Modal

A modal dialog box prevents interaction with the rest of the application until the user dismisses the dialog box.

Modeless

A modeless dialog box allows the user to interact with other parts of the GUI while the dialog box is posted. In ABAQUS/CAE all secondary dialog boxes except for tips should be modal dialog boxes.

A dialog box itself is not defined as modal or modeless—the behavior is obtained from the method used to post the dialog box.

For dialog boxess posted by forms, you can set the modal behavior by calling the form's setModal method and providing an argument of either TRUE or FALSE. If you call setModal with TRUE as its argument, the form will post the next dialog box modally. You can call the setModal method several times within one form if you need to change the modal behavior between the various dialog boxes managed by the form.

For dialog boxes that you post yourself, you can use the showModal method instead of the show method described in the next section. File/Directory selector, Section 5.7.1 includes an example that uses the showModal method.