Style - ForegroundBrush Property

Brush to be used on the foreground text

Member of Style (PRIM_VS.Style)

Data Type - PRIM_VS.Brush - Base class for all visual brushes


The ForegroundBrush property is a reference to an instance of a Brush to be applied to the foreground of the control.
Foreground features of a Style are inherited by child controls. This allows for a single color to be applied at application level that will be used throughout.
If both a ForegroundBrush and TextColor are specified on the same style, the ForegroundBrush will take precedence.


This example shows the definition of a simple style with a foreground Linear Brush.
The IDE will manage the creation of styles and brushes. This code is provided for reference purposes.
Define_Com Class(#PRIM_VS.Style) Name(#ForeGround) Foregroundbrush(#Foregroundbrush)
Define_Com Class(#PRIM_VS.LinearBrush) Name(#Foregroundbrush) Colors(#ForegroundbrushColors)
Define_Com Class(#Prim_Vs.BrushColors) Name(#ForegroundbrushColors)
Define_Com Class(#PRIM_VS.BrushColor) Name(#ForegroundbrushColor1) Color(Silver) Parent(#ForegroundbrushColors)
Define_Com Class(#PRIM_VS.BrushColor) Name(#ForegroundbrushColor1) At(100) Color(White) Parent(#ForegroundbrushColors)

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020