VAlign Property

A Byte type property. Specifies vertical alignment of the text inside this text box.

Applies to: TextBlock object

Syntax

[Let] byteRet = object.VAlign

[Let] object.VAlign = vAlignSet

The VAlign property syntax has these parts:

Part Description
object Required. An expression that returns a TextBlock object.
byteRet Optional. A Byte type variable.
vAlignSet Required. An expression that returns a Byte value.

Remarks

The VAlign property can take one of these values:

Constant Value Description
cdbVertTop 0 Align to the top border.
cdbVertMiddle 1 Align to the center.
cdbVertBottom 2 Align to the bottom border.

The VAlign property is also a table parameter of the shape, which contains the object text box, that is, its value can be described by a formula. To work with VAlign as a table parameter, use the CDPT_VALIGN constant tag.

Example

This example demonstrates how to align the shape's text to the top border. It assumes a shape that contains text exists in the document.

Dim s as Shape
s = thisDoc.ActivePage.ShapeByID(1)
' Sets alignment to the top border.
s.TextBlock.VAlign = cdbVertTop
' Informs ConceptDraw Engine about the changes for re-drawing
s.PropertyChanged(CDPT_VALIGN)

 

See Also

Shape object