Midware Ltd.

Creating Pop-up Windows


Sign-up for e-mail notifications

Take our weekly poll

Dow Jones Intraday

Nasdaq Intraday



Sometimes it's convenient to display a pop-up window in a display file rather than displaying a whole new screen.  For example, you may want to have a confirmation message "Are you really sure? (Y/N)" or display summary totals for a list.

It's easy to code this in your display file DDS.  Create a new record with a type of WINDOW rather than RECORD.  You can also create a type of WDWSFL to create a window subfile.

You must include the dimensions of the window in rows and columns.  You can optionally specify a position for the window to be displayed.  If you do not specify a position, the system will automatically determine an appropriate starting position based on the size of the window and the position of the cursor.

WINDOW(2 2 10 50)

The previous statement will define a window 10-rows by 50-columns, displayed starting in row 2, column 2.

You can also explicitly code the WDWBORDER keyword to specify a border for the window.  Often, a combination of "." and ":" is used to create a border.  However, if you leave this parameter blank, a default border will be used that looks much cleaner.

A window or window subfile function exactly like a normal record or record subfile from the program's perspective.  The only difference is how the screen is displayed.

Overlaying the window(s)

Unfortunately, windows don't automatically overlay the screen behind them - even with the OVERLAY keyword.  Instead, the only way I've found to get the desired results (and I don't know why this is) is to:

  1. Set up a dummy record in your display file.  You can call it anything you want.  Your program doesn't even need to reference it!  I normally name it "KA".
  2. Code a literal on the dummy record.  It could be a simple as a space in one of the corners.
  3. Code the record with the KEEP and ASSUME keywords.

Any windows displayed now (even from a called programs) will automatically overlay whatever screen is currently displayed. 

Home Feedback Contents Search

Send mail to midware@midwareservices.com with questions or comments about this web site.
Copyright 2000 Midware, Ltd.

Last Modified:  September 25, 2000