Align Property

A Byte type property. Specifies the horizontal alignment type of text with respect to the current tab stop.

Applies to: TabStop object

Syntax

[[Let] byteRet =] object.Align

[Let] object.Align = alignSet

The Align property syntax has these parts:

Part Description
object Required. An expression that returns an instance of the TabStop object.
byteRet Optional. A Byte type variable.
alignSet Required. An expression that returns a Byte type value.

Remarks

The following constants show the possible alignment values:

Constant Value Description
cdTabStopLeft 0 Alignment to the left edge.
cdTabStopCenter 1 Alignment by the center.
cdTabStopRight 2 Alignment to the right edge.
cdTabStopDecimal 3 Alignment by the decimal point (for point-delimited real numbers).
cdTabStopComma 4 Alignment by the decimal comma (for comma-delimited real numbers).

The Align property is also a table parameter of the shape, which contains the text block with the object tab stop inside. That is, its value can depend on a formula. To work with Align as a table parameter, use the CDPT_TABALIGN constant tag.

Example

This example demonstrates using the Align property. It assumes, that the active page contains the shape with ID1, which has text. Also, at least one tab stop is defined.

Dim s as Shape, MyTabStop as TabStop

' Assume shape with  ID 1 exists on page.
' Assume the shape's text contains several numbers 
' located on different lines and having point as decimal separator
s = thisDoc.ActivePage.ShapeByID(1)
' Add tab stop that will obtain number 1 s.TextBlock.AddTabStop()
' Get reference to a TabStop object Set MyTabStop = s.TextBlock.TabStop(1)
' Set properties for the first tab stop. ' Numbers in different lines must be aligned by their decimal points. MyTabStop.Pos = 200
MyTabStop.Align = cdbTabStopDecimal
' Inform ConceptDraw Engine about the changes to recalculate and redraw the document s.PropertyChanged(CDPT_TABALIGN)
s.PropertyChanged(CDPT_TABPOS)

 

See Also

Pos property, Shape object, TextBlock object