HAlign Property

A Byte type property. Specifies horizontal alignment of the paragraph's text with respect to the text block's alignment box.

Applies to: Paragraph object

Syntax

[Let] byteRet = object.HAlign

[Let] object.HAlign = hAlignSet

The HAlign property syntax has these parts:

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

Remarks

There are the following types of horizontal alignment:

Constant Value Description
cdHorizLeft 0 Alignment to the left edge.
cdHorizCenter 1 Alignment to the center.
cdHorizRight 2 Alignment to the right edge.

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

Example

This example demonstrates how to align the first paragraph of the shape's text to the right. It assumes a shape that contains text exists in the document.

Dim s as Shape
s = thisDoc.ActivePage.ShapeByID(1)
' Align the first paragraph to the right s.Paragraph(1).HAlign = cdbHorzRight ' Inform ConceptDraw Engine about the changes for re-drawing.
s.PropertyChanged(CDPT_PARA_HALIGN)

 

See Also

SetParaHAlign method