Question about Frames in Progress

kmykwan

New Member
I am very new to progess 4 gl. I hope some one will be able to help.
I would like to create two frames in the page.
Right now I am trying to figure out to put two frames on the page. That is my first step.

FORM
SKIP(1)
"Line #:" at 6
"Release:" at 15
"Box Count:" at 25 SKIP
line1 at 6
release1 at 16
boxCount1 at 26 SKIP
line2 at 6
release2 at 16
boxCount2 at 26 SKIP
line3 at 6
release3 at 16
boxCount3 at 26 SKIP
line4 at 6
release4 at 16
boxCount4 at 26 SKIP
line5 at 6
release5 at 16
boxCount5 at 26 SKIP
line6 at 6
release6 at 16
boxCount6 at 26 SKIP
line7 at 6
release7 at 16
boxCount7 at 26 SKIP
line8 at 6
release8 at 16
boxCount8 at 26 SKIP(1)


WITH FRAME input1 DOWN COLUMN 1 WIDTH 90 NO-LABELS THREE-D TITLE "Generate Receiving Labels".

update
line1
release1
boxCount1
line2
release2
boxCount2
line3
release3
boxCount3
line4
release4
boxCount4
line5
release5
boxCount5
line6
release6
boxCount6
line7
release7
boxCount7
line8
release8
boxCount8
WITH FRAME input1.
FORM
SKIP(1)
"Box" at 6
"Count" at 15
"Qty Per Box" at 25
"Box1:" at 6
count1 at 15
QTYPerBox1 at 25 SKIP
"Box2:" at 6
count2 at 15
QTYPerBox2 at 25 SKIP
"Box3:" at 6
count3 at 15
QTYPerBox3 at 25 SKIP
"Box4:" at 6
count4 at 15
QTYPerBox4 at 25 SKIP
"Box5:" at 6
count5 at 15
QTYPerBox5 at 25 SKIP
WITH NO-LABELS SIZE 86 BY 13.7 NO-BOX.


update
box1
count1
QTYPerBox1
box2
count2
QTYPerBox2
box3
count3
QTYPerBox3
box4
count4
QTYPerBox4
box5
count5
QTYPerBox5
WITH FRAME input2 SIZE 86 BY 13.7.

FRAME input2:FRAME = FRAME input1:HANDLE.
ENABLE ALL WITH FRAME input1.
ENABLE ALL WITH FRAME input2.

Only the first frame will appear in the page. Not the second frame. Is there something that I did wrong. I had play with the size. That did not help at all. Any help will be appreciated.

Thank you.
 
Hi,
Where have you defined your 2nd frame "input2". I don't "with frame input2" in the 2nd form definition. Assuming that its the 2nd frame here are few suggestions of mine;

1) For Frame1 you have provided the width as 90. Progress uses 80 characters width screen
2) Try using Overlay option
3) What are you trying to do with the below handle? Once you have provided the update statement the frame enables automatically.
4) You have used DOWN Option, if you know how many rows are going to be defined please provide appropriate size of the frame itself as it is a static frame.

I hope the above answers will be useful. If you have any questions let me know. Thanks in advance.
 

sphipp

Member
It is normally better to put the Frame definitions/layout in a separate area to updates/views - it makes it easier to read.

Code:
 FRAME input2:FRAME = FRAME input1:HANDLE.
You don't need this - it doesn't achieve anything.

View both frames at once by using the VIEW FRAME command.
Remove the DOWN option from input1 or make them both 1 DOWN.

Your second FORM statement does not have WITH FRAME input2, so you are not going to see the layout that you want.

You are doing two UPDATEs and then enabling the frames, which sems to be mixing modes. UPDATE means you are amending each field in the update, this finishes when you have finished the updating and press GO/F2/F1 depending on if this is CHUI or GUI. ENABLE means that the fields are set to be in a state enabling them to be updated but you are not explicitly in an UPDATE command. ENABLE is commonly used in event-driven programs (normally with a WAIT-FOR statement), UPDATE in non-event-driven programs.

After you update the variables you are using ENABLE. This would mean that when the update is finished you then present the frames as updateable again, which is going to be confusing for the user - has the update finished or not?

Change the WITH statements to be something like this:
Code:
WITH FRAME input1 COLUMN 1 WIDTH 90 NO-LABELS 1 DOWN THREE-D TITLE "Generate Receiving Labels". 
 
WITH NO-LABELS SIZE 86 BY 13.7 NO-BOX 1 DOWN FRAME input2 ROW 12.

You might want to include this line of code at the start of the processing, which stops the space bar appearing between hides of frames.

Code:
PAUSE 0 BEFORE-HIDE.

To view 2 frames on the same screen, try:

Code:
VIEW FRAME input1.
VIEW FRAME input2.

update 
<fields> 
WITH FRAME input1.

update
<fields>
WITH FRAME input2 SIZE 86 BY 13.7.

or

Code:
VIEW FRAME input1.
VIEW FRAME input2.

ENABLE ALL WITH FRAME input1.
ENABLE ALL WITH FRAME input2.
 

Just4known

New Member
FRAME input2:FRAME = FRAME input1:HANDLE.

what is the use of this statement?
can anybody please explain it.
thanks in advance.
 
Top