TextHorzOffset: Double;
The TextHorzOffset property determines horizontal offset of text.
The property can be used only for the line described by the IWxLink interface. If the property values are positive, text is offset right from the line center, if they are negative, it is offset left from the line center.
Executing the example requires that the repository contains a workspace with the WSP identifier that contains a line.
Add links to the Andy, Metabase system assemblies.
Sub UserProc;
Var
Mb: Imetabase;
Wsp: IWxWorkspace;
Link: IWxLink;
Begin
// Get workspace for editing
Mb := MetabaseClass.Active;
Wsp := Mb.ItemById("WSP").Edit As IWxWorkspace;
Wsp.BeginUpdate;
Link := Wsp.Shapes.Item(0) As IWxLink;
Link.Text := "Text";
Link.TextHorzOffset := 20;
Link.TextVertOffset := -10;
Wsp.EndUpdate;
// Save changes
(Wsp As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the text for the line is defined and shifted.
See also: