IWxStyle.TextMarginTop

Syntax

TextMarginTop: Double;

Description

The TextMarginTop property determines text top margin. If the values are negative, margin is calculated from the opposite side.

Example

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

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
Begin
    
// Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById(
"IWSTYLE").Edit As IWxWorkspace;
    ws.BeginUpdate;
    Shape := ws.Shapes.Item(
0);
    Shape.Text := 
"Text";
    Style := Shape.Style;
    Style.TextFontSize := 
14;
    Style.TextFontBrushColor := GxColor.FromName(
"Red");
    Style.TextMarginTop:= 
12;
    ws.EndUpdate;
    (ws 
As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the object will contain text of the defined color and size and with the set margin.

See also:

IWxStyle