Kbase 33142: How to resize a SmartWindow and its contained objects to multiple screen resolutions
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Solution ID: P3142
GOAL:
How to resize a SmartWindow to multiple screen resolutions?
FACT(s) (Environment):
Progress 9.x
FIX:
Since ADM2 was not designed to support this rather sophisticated feature, this it must be coded by hand. Here are few hints to achieve it:
The available space on the screen can be obtained with the following two attributes of the SESSION system handle:
SESSION:WORK-AREA-HEIGHT-PIXELS
SESSION:WORK-AREA-WIDTH-PIXELS
This work area height and width should be taken into account in an override of InitializeObject to resize the SmartWindow and to resize and reposition the contained SmartObjects and static widgets of page 0. Make sure that everything fits in its container.
Finally, in order to manage each page, do a procedure override of createObjects, or create a postCreateObjects procedure in the SmartWindow. (This was introduced in 9.1B. See code of createObjects in src/adm2/container.p.) This is the right place to manage the available space for the objects, to reposition or resize by calling the following two ADM2 procedures for each SmartObject concerned:
-repositionObject IN h_SmartObject (row,col) NO-ERROR.
-resizeObject IN h_SmartObject (height,width) NO-ERROR.