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:
- Specify the window title (TITLE attribute).
- Set the normal, minimum, and maximum sizes of the window. You can do this in either of two units:
- Specify the maximum display area within the window (VIRTUAL–HEIGHT–CHARS, VIRTUAL–WIDTH–CHARS, VIRTUAL–HEIGHT–PIXELS, VIRTUAL–WIDTH–PIXELS).
- Allow or prevent the user resizing the window by setting the RESIZE attribute.
- Specify the presence or absence of a window component or its appearance, such as message area (MESSAGE–AREA, MESSAGE–AREA–FONT), status area (STATUS–AREA, STATUS–AREA–FONT), or scroll bars (SCROLL–BARS).
- Change the state (minimized, maximized, restored) of a window within a program (WINDOW–STATE attribute).
- Associate a menu bar or pop-up menu with the window (MENUBAR or POPUP–MENU attribute).
- Find all frames within the window (FIRST–CHILD or LAST–CHILD attribute of the window; NEXT–SIBLING or PREV–SIBLING attribute of frames).
- Set up parent and child relationships between windows (PARENT attribute).
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 ALT–TAB. 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:
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 |