DEFINE VARIABLE f$x AS DECIMAL NO-UNDO.
DEFINE VARIABLE f$y AS DECIMAL NO-UNDO.
RUN dispatch IN h_f-frame /* Destroy current frame */
('destroy':U).
RUN init-object IN THIS-PROCEDURE
(INPUT 'frame-filename',
INPUT FRAME F-Main:HANDLE ,
INPUT 'Layout = ':U ,
OUTPUT h_f-frame ).
RUN get-size IN h_f-frame
(OUTPUT f$x,
OUTPUT f$y).
IF f$x <= FRAME {&FRAME-NAME}:WIDTH THEN
ASSIGN f$x = (FRAME {&FRAME-NAME}:WIDTH - f$x) / 2.
ELSE
ASSIGN f$x = 0.
RUN set-position IN h_f-frame
( f$y , f$x ) NO-ERROR.
RUN dispatch IN h_f-frame
('initialize':U).