Style (PRIM_VS.Style)

Style used to define foreground and background appearance

Ancestors - Object (PRIM_OBJT)

Details

Styles are used to define the appearance of controls. They allow you to define the color of text, background colors, fonts, borders and other visual features.
 
Unlike its forerunner Visual Style, multiple Styles can be added to a control affecting only the features specified on the style. If the same feature of a style is applied using two different style instances, the last one to be applied will take precedence.
 
Only foreground features are adopted by child controls e.g. FaceName and TextColor. This means a facename applied at application level will be used throughout the application. If the size of the font needs to change, only the size need be specified on the style.
 
Styles can be created and applied directly to controls in components. However, this is counterproductive and leads to unnecessary complications. Instead, Themes should be used to define an overall application style, with individual styles being used for ad hoc and very specific requirements.
 
For modern LANSA applications running on the desktop under DirectX Visual Style has been superseded and should not be used.

Properties

NameDescription
BackgroundBrushBrush to be used as the background
BoldBold makes text bold
BorderBottomWidth of the border to be shown at the bottom
BorderBrushBrush to be used on the borders
BorderColorBorderColor sets the color of grid borders
BorderLeftWidth of the border to be shown to the left
BorderRightWidth of the border to be shown to the right
BorderTopWidth of the border to be shown at the top
ComponentClassNameComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembersComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternNameComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTagGeneric space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentTypeComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeNameComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
CornerBottomLeftWidth of the corner at the bottom left
CornerBottomRightWidth of the corner at the bottom right
CornerTopLeftWidth of the corner at the top left
CornerTopRightWidth of the corner at the top right
CursorCursor to be applied when the mouse enters the control boundary
EffectReference to the effect to apply to the style
FaceNameFaceName is the name of the font
FontSizeFontSize sets the size of the font
FontUnitsSize of the font in pixels or points
FontWeightFontWeight specifies the variation of the font to be used
ForegroundBrushBrush to be used on the foreground text
ItalicItalic makes the font italic
LineColorLine color applied to list row and column lines
MaskBrushBrush to be used as an opacity mask
NameName identifies the component Inherited from Object (PRIM_OBJT)
NormBackColorRGB color value or a LANSA specified color name applied to the background
OwnerOwner owns this component Inherited from Object (PRIM_OBJT)
ParentThe component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT)
ShapeDefines the appearance of the control
StrikeOutShow the text with a horizontal line through each character
TextColorRGB color value or a LANSA specified color name applied to the foreground text
UnderlineUnderline makes the font underlined

Events

NameDescription
CreateInstanceCreateInstance is signalled when an instance of a component is created Inherited from Style (PRIM_VS.Style)
DestroyInstanceDestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Style (PRIM_VS.Style)

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2