FRAME widget
A frame is a display area within a window that can group together (contain) a set of field-level widgets and child frames. In addition to default frames set up by ABL, you can set up static frames with the Frame phrase or DEFINE FRAME statement. You can create a dynamic one-down frame with the CREATE widget statement.
Related field-level widgets and child frames are actually parented by a single field group widget, which is owned, in turn, by the parenting frame. You parent static field-level widgets to a static frame using a DEFINE FRAME, FORM, or FRAME I/O statement. You parent dynamic field-level widgets to any frame by setting the FRAME attribute of each field-level widget to the handle of the parent frame. You can parent frame widgets to any frame by setting the FRAME attribute of each child frame to the handle of its parent frame.
Frames in a parent and child relationship form a frame family, which is a hierarchy of parent and child frames ultimately parented by a window. The top parent frame that is parented by the window is the root frame of the frame family.
The following figure shows a frame family with four frames, including three child frames titled Contact Information, Account Information, and PREVIOUS/NEXT:
Attributes
Methods
Events
Notes
- Field-level widgets and child frames are not directly parented by a parent frame. They are parented by field groups that are owned by the parent frame. Thus, you can also parent a child frame by setting the child frame’s PARENT attribute to the handle of a field group in the parent frame.
To access all the field-level widgets and child frames owned by a frame, you must first use the frame’s FIRST-CHILD or LAST-CHILD attribute to find a field group within the frame. You can then use the field group’s NEXT-SIBLING or PREV-SIBLING attribute to find other field groups in the frame. You can use the field group’s FIRST-CHILD or LAST-CHILD attribute to find a field-level widget or child frame within the field group. You can then use the field-level widget’s or child frame’s NEXT-SIBLING or PREV-SIBLING attribute to find other field-level widgets and child frames within the frame.- Child frames do not inherit the attributes of a parent frame.
- When any of a frame’s field-level widgets or child frames are viewed using the DISPLAY or ENABLE statement, the parent frame also becomes visible unless its HIDDEN attribute or the HIDDEN attribute of an ancestor widget is TRUE. However, explicitly setting the VISIBLE attribute to TRUE (using the VIEW statement) for a child frame or field-level widget makes all ancestor frames visible, unless the parent or an ancestor window has its HIDDEN attribute set to TRUE.
- Child frames participate in the tab order along with any field-level widgets in the same parent frame. This means that the tab orders of all field-level widgets within a child frame is placed as a group within the tab order of the siblings of that child frame. Thus, tabbing proceeds between the field-level widgets of a root frame and the field-level widgets of all descendant frames. However, tabbing is not supported between sibling root frames (frames parented by a window).
- You specify the position of a child frame relative to the display area of the parent frame. You must specify the position so that the upper left corner of the child frame lies within the display region of the parent frame. Otherwise at run time, when the procedure tries to realize the frame, the AVM raises the ERROR condition.
- When you apply a NEXT-FRAME or PREV-FRAME navigation key function to a field-level widget, focus changes from the current frame family to the next or previous frame family (respectively) parented by the same window. That is, these key functions change focus between root frames, not between descendant frames.
- In character interfaces, the SCROLL-MODE function key is available for a frame only if the SCROLLABLE attribute of the frame is TRUE. Scroll mode allows you to use the CURSOR-RIGHT and CURSOR-LEFT keys to scroll the frame horizontally. The SCROLL-MODE function key toggles scroll mode on and off for a frame that has focus.
See alsoCREATE widget statement, DIALOG-BOX widget, DEFINE FRAME statement, Frame phrase
OpenEdge Release 10.2B
|