Alignment Property (ATextBox)

Returns and sets the alignment of text displayed in the object.

Syntax

Object.Alignment [ = enATexbBoxAlignment ]

The Alignment property syntax has the following parts:

 

Name

Type

Description

Object

ATextBox

ATextBox control

enATexbBoxAlignment

enumATextBoxAlignment

An integer specifying the type of alignment.

Where

enumATextBoxAlignment can be one of the following:

 

Name

Value

Description

atbLeft

0*

Text is left aligned.

atbRight

1

Text is right aligned.

atbCenter

2

Text is centered.

Comments

Item text can be aligned to the left, right, or centered. Be default, the text is left-aligned (on the left side of the ATextBox).

This property can be set at design time as well as at run time.

Example

The following statement returns the type of alignment of the ATextBox:

if tbDesc.Alignment=atbCenter

print "Text Centered"

endif

The following statement sets the type of alignment of the ATextBox:


tbDesc.Alignment = atbLeft

Applies to

ATextBox

See Also

 

ScrollBars