Resizing Dialog-Frame

Yohn

Member
Hy.
I need re size frame dialog-frame using input parameters. What is best way to that. When I call program i send him a file, and 2 parameters for wight and height.
 
Check the below code might help you...

DEFINE VARIABLE frame1 AS WIDGET-HANDLE.
CREATE FRAME frame1
ASSIGN
WIDTH-CHARS = 30
HEIGHT-CHARS = 60
SENSITIVE = YES.
VIEW frame1.
 

sphipp

Member
Try

Code:
DEFINE VARIABLE cTest   AS CHARACTER  NO-UNDO.
DEFINE VARIABLE hfrmain AS HANDLE     NO-UNDO.
DEFINE VARIABLE htest   AS HANDLE     NO-UNDO.
DEFINE VARIABLE hBtnOK  AS HANDLE     NO-UNDO.
DEFINE BUTTON btnOK LABEL "OK".
DEFINE FRAME frmain
    ctest VIEW-AS EDITOR SIZE 50 BY 5 AT ROW 1 COL 1 
    btnok AT ROW 1 COL 1
    WITH NO-LABELS 1 DOWN THREE-D.
 
ASSIGN ctest = "Hello" + CHR(10) + "World" + CHR(10).
ASSIGN hfrmain = FRAME frmain:HANDLE
       htest   = ctest:HANDLE IN FRAME frmain
       hbtnok  = btnok:HANDLE IN FRAME frmain.
DISPLAY cTest WITH FRAME frMain.
MESSAGE "Press OK to watch it move" VIEW-AS ALERT-BOX INFO BUTTONS OK.
 
ASSIGN htest:COL      = 2
       htest:ROW      = 1
       htest:HEIGHT   = NUM-ENTRIES (ctest,CHR (10))
       hBtnOK:ROW     = htest:ROW + htest:HEIGHT
       hfrmain:COL    = 10
       hfrmain:ROW    = 3
       hfrmain:HEIGHT = htest:HEIGHT + htest:ROW 
       hfrmain:WIDTH  = htest:WIDTH + htest:COL NO-ERROR.

This is basically the same as http://www.progresstalk.com/showthread.php?t=116217.
 

Yohn

Member
I have two input parameters - one for height, and width. I have editor, some fill-in and four buttons. I use run name_of_program("customer.txt", 200, 40) and then run it. Frame and Dialog-Frame make resize, but fill-ins and buttons don't resize with frame.
 
Top