Progress
Programming
Handbook


Scrollable Frames

You can define a scrollable frame that is bigger than the display space allotted for it. The user can then use scroll bars to view the entire frame.

You can explicitly set the maximum dimensions of a frame with the VIRTUAL–WIDTH–PIXELS, VIRTUAL–HEIGHT–PIXELS, VIRTUAL–HEIGHT–CHARS, and VIRTUAL–WIDTH–CHARS attributes. You can specify the display size of the frame with the SIZE option of the Frame phrase, as shown below.

SYNTAX
{ SIZE | SIZE-CHARS | SIZE-PIXELS } width BY height 

If the SCROLLABLE attribute is FALSE, the frame is forced to fit into the display space. If SCROLLABLE is TRUE, then if the size as specified by the SIZE phrase does not fit within the display area, only a portion of the frame is displayed and scroll bars appear.

The SCROLLABLE option defaults to TRUE if you use the SIZE option; otherwise, it defaults to FALSE.

For example, the following code defines a frame, choose–frame, that is bigger than its display size:

p-scrlab.p
FORM
    Customer.name Customer.address Customer.address2
    Customer.city Customer.st
    WITH FRAME choose-frame 33 DOWN SIZE 40 BY 5.

PAUSE 0 BEFORE-HIDE.
FOR EACH customer BREAK BY Customer.name:
    DISPLAY name address address2 city st
            WITH FRAME choose-frame.
    IF NOT LAST(customer.name)
    THEN DOWN WITH FRAME choose-frame.
END.

REPEAT:
    CHOOSE ROW Customer.name WITH FRAME choose-frame.   
    FIND customer WHERE Customer.name = FRAME-VALUE.
    DISPLAY customer WITH SIDE-LABELS.
END. 

If you run this code and select Urpon Frisbee, the following screen appears:

You can use scroll bars to move within choose–frame (in the upper-left corner of the display) to see basic information on each customer. You can then choose to see more information on an individual customer.

In character interfaces, you can scroll a frame by pressing SCROLLMODE (ESCT on most terminals). This enters a separate scroll mode in which you can scroll the frame one row or column at a time with the cursor keys. You can page up and down with the PAGEUP, PAGEDOWN, END, HOME, RIGHTEND, and LEFTEND keys. No other frame input is possible in scroll mode. To exit scroll mode, press SCROLLMODE or ENDERROR.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095