Overriding default color inheritance
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Overriding default color inheritance
If you specify colors for a frame-level widget, but
not its field-level widgets, the field-level widgets inherit the
colors of the containing frame, by default. ABL provides widget
attributes and options that allow you to override this default color
inheritance for the following field-level widgets: BROWSE, COMBO-BOX (all
types), EDITOR, FILL-IN (NATIVE
and Enabled), and SELECTION-LIST.
You can use the INHERIT-FGCOLOR and INHERIT-BGCOLOR attributes
to control whether the field-level widgets listed above inherit
the foreground and background colors of their containing frame.
Setting these attributes to TRUE allows these field-level
widgets to inherit the foreground and background colors of their
containing frame. Setting these attributes to FALSE prevents
these field-level widgets from inheriting the foreground and background
colors of their containing frame. You can also set these attributes
on the SESSION system handle to specify the foreground
and background color inheritance for all frame-level widgets created
in the session.
When defining static frame-level widgets, you can control foreground and background color inheritance on a frame-by-frame basis by specifying the following options on the Frame phrase:
- Use the
INHERIT-FGCOLORandINHERIT-BGCOLORoptions to allow field-level widgets in the frame to inherit the frame's foreground and background colors. - Use the
NO-INHERIT-FGCOLORandNO-INHERIT-BGCOLORoptions to prevent field-level widgets in the frame from inheriting the frame's foreground and background colors.