Inherit Colors (InheritColors)

Determines whether the background and foreground colors of the parent entity or form can be inherited. This property can be set in ProcScript for the widgets, but not for labels. Valid Values are True or False (default).

InheritColors="True" | "False"




Do not inherit colors. If no colors are set, use the system default.


Inherit the colors of the parent entity or form.

  1. If the colors of the parent entity is not set, inherit from the parent form.

  2. If the colors of the form is not set, use Windows system colors.



Yes for widgets; No for labels

Supported in Grid?



For edit boxes, the deprecated EntColor property takes precedence over Inherit Colors


If a color is specified for the widget or label, this color is applied. However, if no color is defined, and Inherit Colors is true, Uniface applies the first color definition it encounters in its color inheritance search path. For more information, see Color Inheritance .


If Inherit Colors is set to true, there may be some differences in labels and widget colors between Uniface 8 and Uniface 9. This can occur because:

  • Form Texts in Uniface 8 are migrated to labels in Uniface 9. If Color is set to No, they automatically inherit the parent foreground and background colors. Formerly, they only inherited the background color.

  • It is possible to set both the Foreground Color (ForeColor) and Background Color (BackColor) of entities and forms using $entityproperties and $windowproperties. Formerly, it was only possible to set the background color.

Setting InheritColors for Widgets

To set the Inherit Colors property:

  • In ProcScript, use $fieldproperties; for example,


  • In the Uniface IDE, set the Inherit Colors widget property.

  • In the usys.ini file, edit the widget definition; for example:



Setting InheritColors for Labels

For labels, it is only possible to set InheritColors in the usys.ini file. This sets it for all labels in the application. It is not possible to set InheritColors for individual labels.

Using in ProcScript

You can use $properties or $fieldproperties to set or get the property and its value. For more information, see $properties and $fieldproperties.

$fieldproperties(FLD) = "InheritColors=true"

Related Topics