CMDialog Class

The CMDialog class encapsulates behavior for the common dialog subclasses, which provide an interface between JADE logic and the environmental dialogs (Windows comdlg32 library file). To initiate a common dialog using these classes, the comdlg32 library file must be in your path.

To invoke a common dialog, perform the following actions

  1. Define a local instance of the class.

  2. Create the instance.

  3. Set any options for the common dialog, by using its properties.

  4. Call the open method for the instance.

  5. Optionally delete the instance when it is no longer required.

The following example shows the invocation of the common Color dialog.

vars
    colDlg : CMDColor;
begin
    create colDlg;
    colDlg.color := backColor;            // set initial displayed color
    if colDlg.open = 0 then               // not cancelled and no error
        backColor := colDlg.color;        // now use the returned value
    endif;
epilog
    delete colDlg;                        // tidy
end;

The common classes that are subclasses of the CMDialog class are listed in the following table.

Subclass Description
CMDColor Color dialog
CMDFileOpen File Open dialog
CMDFileSave Save dialog
CMDFont Font dialog
CMDPrint Print or Printer Selection dialog

The created common dialog instance is transient and does not require transaction state. The created instance is discarded on completion of the application, if it is not deleted.

This class is not available in a server node.

In JADE thin client mode, common dialogs execute on the presentation client and return information relative to the presentation client.

For details about the properties defined in the CMDialog class, see "CMDialog Properties", in the following subsection.

Object

CMDColor, CMDFileOpen, CMDFileSave, CMDFont, CMDPrint