Kbase P112877: ADM2: How to make a SmartFrame resizeable?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/10/2008 |
|
Status: Unverified
GOAL:
How to make an ADM2 SmartFrame resizeable?
FACT(s) (Environment):
Progress 9.1x
OpenEdge 10.x
Windows
FIX:
When a SmartFrame is added to a SmartWindow there is no way to resize the SmartFrame once added. Adding resizeObject internal procedure to the SmartFrame will allow the developer to make changes at design time :
PROCEDURE resizeObject:
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 that resizeObject is not in the override methods 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 '<YourSmartFrame>.w':U ,
INPUT FRAME fMain:HANDLE ,
INPUT 'HideOnInit no DisableOnInit no ObjectLayout ':U , OUTPUT h_<yoursmartframe> ).
RUN repositionObject IN h_<yoursmartframe> ( 2.91 , 11.00 ) NO-ERROR.
/* resizeObject method call */
RUN resizeObject IN h_<yoursmartframe> ( 10.24 , 101.00 ) NO-ERROR.