About Visual Attributes
Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface. Visual attributes can include the following properties:
- Font properties: Font Name, Font Size,
Font Style, Font Width, Font Weight
- Color and pattern properties: Foreground Color, Background Color, Fill Pattern
Every interface object has a Visual Attribute Group property that determines how the object's individual visual attribute settings (Font Size, Foreground Color, etc.) are derived. The Visual Attribute Group property can be set to Default, NULL, or the name of a named visual attribute defined in the same module.
There are several ways to set the visual attributes of objects:
- In
the Property Palette, set the Visual Attribute Group property as desired,
then set the individual attributes (Font Name, Foreground Color, etc.) to
the desired settings.
- In
the Layout Editor, select an item or a canvas and then choose the desired
font, color, and pattern attributes from the Font dialog and Fill Color and
Text Color palettes.
- Define a named visual attribute object with the appropriate font, color,
and pattern settings and then apply it to one or more objects in the same
module. You can programmatically change an object's named visual attribute
setting to change the font, color, and pattern of the object at runtime.
- Subclass a visual attribute that includes visual attribute properties and
then base objects on it that inherit those properties.
- Create a property class that includes visual attribute properties and then
base objects on it that inherit those properties.
Related topics
About default visual attributes
About named visual attributes
Guidelines for creating visual attributes
Creating a named visual attribute