IWxWorkspace.Styles

Syntax

Styles: IWxStyles;

Description

The Styles property returns a workspace styles collection.

Example

Executing the example requires that repository contains a workspace with the WSP identifier.

Add links to the Andy, Drawing, Metabase system assemblies.

Sub userproc;
Var
    mb: IMetabase;
    wp: IWxWorkspace;
    Sts: IWxStyles;
    style: IWxStyle;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wp := mb.ItemById("WSP").Edit As IWxWorkspace;
    Sts := wp.Styles;
    style := wp.CreateStyle;
    style.Id := "MyStyle";
    Sts := wp.Styles;
    style := Sts.FindById("My_Style");
    style := Sts.Item(0);
    style.BackgroundBrushForeColor := GxColor.FromName("Red");
    //Save changes
    (wp As IMetabaseObject).Save;
End Sub userproc;

After executing the example the color of background fill is changed for the found style.

See also:

IWxWorkspace