Try OpenEdge Now
skip to main content
GUI for .NET Primer
Basic Types of Forms and Application Design : Using the WAIT-FOR statement : Modal dialogs
 

Modal dialogs

The ShowDialog( ) method on the form is used in the WAIT-FOR statement to display and wait for a modal .NET dialog box. If you display the modal dialog box within an existing .NET event loop, the nested WAIT-FOR must be satisfied before returning to the outer WAIT-FOR. The application ends the WAIT-FOR by calling the Close( ) method on the modal form object.
In this example, the rDateForm form is created and displayed as a modal dialog using the ShowDialog( ) method:
rDateForm = NEW Progress.Examples.MyDialog.
...
WAIT-FOR rDateForm:ShowDialog( ).
This is an example of the WAIT-FOR statement for a modal dialog in which the parent form is specified:
WAIT-FOR FormObjectRef:ShowDialog( ParentFormObjectRef ).
ParentFormObjectRef is an object reference to the dialog's parent form. This version of the ShowDialog( ) method allows the dialog to display centered over the parent form.