IWxStyle.Id

Syntax

Id: String;

Description

The Id property determines formatting style identifier.

By default, styles will be assigned with the Style N identifiers, where N is a style number.

Example

Executing the example requires that the repository contains workspace with the IWSTYLE identifier containing several shapes.

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

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    style: IWxStyle;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    style := wsp.CreateStyle;
    style.Id := "New_Style";
    style.IsPrivate := False;
    style.BackgroundBrushForeColor := GxColor.FromName("Red");
    style.ShadowBrushForeColor := GxColor.FromName("Yellow");
    style.TextAlignmentHorizontal := GxAlignment.Far;
    (wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the added style is displayed in the styles collection.

See also:

IWxStyle