English

How To: Force dialog to always stay on top

Summary

This article describes how use Avenue to force a Dialog Designer dialog box to stay on top by setting the Dialog as its server. This applies to Solaris 2.6 using CDE-desktop.

Procedure

Lets assume the dialog box is named D1.

  1. Add the following to the 'Open' script of the dialog box:

    Code:
    self.setserver(av.getactivdoc)

  2. Add the following to the 'Close' script of the dialog box:

    Code:
    self.setsesrver(nil)

  3. Paste the following code into the new script window and compile.

    Code:
    d = av.finddialog("D1")
    d.setserver(av.getactivedoc)
    d.activate

  4. Specify the new script in the ServerActivated and ServerDeactivated dialog properties.