CreateStyle: IWxStyle;
The CreateStyle method creates a formatting style.
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;
ws: IWxWorkspace;
BArrow: IWxBoxArrow;
Style: IWxStyle;
Begin
// Get workspace for editing
mb := MetabaseClass.Active;
ws := mb.ItemById("WSP").Edit As IWxWorkspace;
// Connect the second shape with the first one
BArrow := ws.CreateBoxArrow;
BArrow.Id := "BoxArrow1";
BArrow.ArrowHeightOffset := 3;
BArrow.ArrowWidthOffset := 25;
BArrow.Angle := 40;
Style := ws.CreateStyle;
Style.BackgroundBrushForeColor := GxColor.FromName("Red");
Style.ShadowBrushForeColor := New GxColor.CreateRGB(0, 129, 255);
Style.ShadowBrushBackColor := New GxColor.CreateRGB(255, 87, 192);
Style.ShadowBrushPattern := GxBrushPattern.Diagonals;
BArrow.Style := Style;
(ws As IMetabaseObject).Save;
End Sub UserProc;
After executing the example an arrow callout is created in a workspace, and a specific formatting style is created for this callout.
See also: