IWxStyles.Item

Syntax

Item(Index: Integer): IWxStyle;

Parameters

Index. Style index.

Description

The Item property returns a style by the defined index.

Example

Executing the example requires that repository contains a workspace with the IWSTYLE identifier containing style.

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Sts: IWxStyles;
    style: IWxStyle;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    Sts := ws.Styles;
    style := Sts.Item(0);
    style.BackgroundBrushForeColor := GxColor.FromName("Red");
    (ws As IMetabaseObject).Save;
End Sub UserProc;

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

See also:

IWxStyles