Progress
Programming
Handbook


Frame Families

By default, when Progress allocates a frame or when you display and accept input from an explicitly defined frame, Progress parents that frame to either the current window or the window you specify.

NOTE: In character interfaces Progress provides only the current window. You cannot create additional windows.

For example, the following procedure parents frame cust–frame to the current window with the first DISPLAY statement. It then parents cust–frame to the window specified by hwin with the second DISPLAY statement:

p-frmwin.p
DEFINE VARIABLE hwin AS WIDGET-HANDLE.
CREATE WINDOW hwin
    ASSIGN TITLE = "New Window".
CURRENT-WINDOW:TITLE = "Current Window".

FIND FIRST customer.

DISPLAY name balance WITH FRAME cust-frame.
DISPLAY name balance WITH FRAME cust-frame IN WINDOW hwin.

PAUSE. 

Note that a frame can be parented to only one window at a time. So, when the second DISPLAY statement parents cust–frame to the new window, it is removed from the current window. For more information on window management, see Windows."

Frame Relationships

You can also parent a frame (child frame) to another frame (parent frame). This causes Progress to view the child frame within the display area of the parent frame. Frames that are parented by a frame, which in turn is parented by a window, form a frame family. The frame parented by the window is the root frame of the frame family. Frames parented by any child frame, in turn, form a child frame family. All frames in a frame family are viewed within the display area of the root frame, and all frames of a child frame family are displayed within the display area of the parenting child frame. As with root frames and their parent windows, a child frame can have only one parent frame at a time.

Figure 19–6 and Figure 19–7 show a typical frame family with three child frames. The root frame is the Customer Data frame, which is contained by the Update window.

Figure 19–6: Frame Family (Windows Graphical Interface)

Figure 19–7: Frame Family (Character Interface)

The three child frames include the Contact Information, Account Information, and Find and Update Customer frames. Note how these three frames are nested between the top and bottom fields of the parent Customer Data frame.

Frame Family Behavior

Child frames behave like field-level widgets in a frame, as the remaining sections in this chapter explain. In fact, a frame is parented to a frame in exactly the same way that a field-level widget is parented to a frame, using a field group. For more information on field groups, see the "Field-group Widgets" section.


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