Progress
Programming
Handbook


Setting Frame Attributes

The following procedure shows how you can set frame attributes to control the appearance of frames:

p-frm16.p
DEFINE FRAME a
   customer.cust-num customer.name
   WITH DOWN USE-TEXT WIDTH 40 TITLE "Customers".

DEFINE FRAME b
    salesrep
    WITH USE-TEXT TITLE "Sales Rep".
  
FRAME a:HEIGHT-CHARS = SCREEN-LINES - (FRAME b:HEIGHT-CHARS + 1).

FOR EACH customer, salesrep OF customer WITH FRAME a:
   DISPLAY cust-num name.
   FRAME b:TITLE = "Sales Rep for " + customer.name.
   DISPLAY salesrep WITH FRAME b.
END. 

This procedure adjusts the height of frame using the HEIGHT–CHARS attribute so that both a and b fit on the screen. In each iteration of the FOR EACH loop, the procedure resets the title of frame b to include the name of the current customer using the TITLE attribute.

This procedure produces the following output:

Many frame attributes correspond in name and function to the options of the Frame phrase. For more information on frame attributes, see the reference entries for the FRAME Widget and for the frame attributes in the Progress Language Reference .


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