TopMargin Property

A Single type property. Specifies the distance between the top border of the text box and the first line of text it contains.

Applies to: TextBlock object

Syntax

[[Let] singleRet =] object.TopMargin

[Let] object.TopMargin = topMarginSet

The TopMargin property syntax has these parts:

Part Description
object Required. An expression that returns a TextBlock object.
singleRet Optional. A Single type variable.
topMarginSet Required. An expression that returns a Single value.

Remarks

The unit of measure for the TopMargin property is InternalUnit.

The TopMargin property is also a table parameter of the shape, to which the object text block belongs - that is, its value can be described by a formula. To work with TopMargin as a table parameter, use the CDPT_TOPMARGIN constant tag.

Example

This example shows how to increase the distance between the top border of the text box and the first line of text it contains. It assumes the shape exists and contains text.

Dim s as Shape
s = thisDoc.ActivePage.ShapeByID(1)
' Increase the distance between the top border of the text box and the text by 20 points.
s.TextBlock.TopMargin = 20
' Inform ConceptDraw Engine about the changes to recalculate and redraw the document
s.PropertyChanged(CDPT_TOPMARGIN)