Kbase 21727: How To Make a SmartFrame Resizeable
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/29/2002 |
|
SUMMARY:
This information applies to Progress Version 9.x ADM2 GUI.
Adding the resizeObject internal procedure to a SmartFrame makes the SmartFrame resizable when it's placed into another SmartContainer.
SOLUTION:
Here is the 4GL code for the resizeObject procedure of the SmartFrame object:
PROCEDURE resizeObject:
/*-------------------------------------------------------------
Purpose:
Parameters: <none>
Notes:
---------------------------------------------------------------*/
DEFINE INPUT PARAMETER vd_height AS DECIMAL.
DEFINE INPUT PARAMETER vd_width AS DECIMAL.
ASSIGN FRAME {&FRAME-NAME}:HEIGHT = vd_height
FRAME {&FRAME-NAME}:WIDTH = vd_width
NO-ERROR.
END PROCEDURE.
NOTE: resizeObject is not in the override method list for the SmartFrame.
The adm-create-objects of the SmartContainer, where the SmartFrame is
added, will call the resizeObject method. For example:
RUN constructObject (
INPUT 'demo91c/cust_f.w':U ,
INPUT FRAME fMain:HANDLE ,
INPUT 'HideOnInit?no?DisableOnInit?no?ObjectLayout?':U ,
OUTPUT h_cust_f ).
RUN repositionObject IN h_cust_f ( 2.91 , 11.00 ) NO-ERROR.
/* resizeObject method call */
RUN resizeObject IN h_cust_f ( 10.24 , 101.00 ) NO-ERROR.