Progress
Programming
Handbook


Window Attributes and Methods

You can set attributes for both the static window created by Progress and windows that you create. You can, for example:

There are also several methods available on a window widget. The most common of these methods that apply to windows are the LOAD–ICON() and LOAD–SMALL–ICON() methods. These methods allow you to associate icons with windows. The icon displays to reference a window in one of its states such as minimized or maximized. For example, using the LOAD–ICON() method allows you to specify an icon to display in the title bar of a window (maximized), in the task bar (minimized), and when selecting a program using ALTTAB. The LOAD-SMALL–ICON() method allows you to specify an icon to display in the title bar of a window and in the task bar only. The value you assign with either the LOAD–ICON() or the LOAD–SMALL–ICON() methods must be the name of an icon (.ico) file. Both of these methods accommodate icons formatted as small size (16x16), regular size (32x32), or both.

For more information on these and other window attributes and methods, see the Progress Language Reference .

The following procedure uses attributes of the static window to make the window wide and short and to change its title:

p-wina.p
OPEN QUERY custq FOR EACH customer.
DEFINE BROWSE custb QUERY custq DISPLAY cust-num name WITH 15 DOWN.

FORM
  custb
  WITH FRAME x.

FORM
   customer
   WITH FRAME y SIDE-LABELS COLUMN 40 ROW 3 WIDTH 75.

ASSIGN DEFAULT-WINDOW:VIRTUAL-WIDTH-CHARS = 120
       DEFAULT-WINDOW:VIRTUAL-HEIGHT-CHARS = 15
       DEFAULT-WINDOW:WIDTH-CHARS = 120
       DEFAULT-WINDOW:HEIGHT-CHARS = 15
       DEFAULT-WINDOW:TITLE = "Customer Browser".

ON ITERATION-CHANGED OF BROWSE custb
  DO:
     DISPLAY customer WITH FRAME y.
  END.

ON WINDOW-CLOSE OF CURRENT-WINDOW 
     QUIT.

ENABLE custb WITH FRAME x.
  
APPLY "ITERATION-CHANGED" TO BROWSE custb.

ENABLE ALL WITH FRAME y.

WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 

When you run this code, the following window appears:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095