Alignment Property (AListBox)

Returns and sets the alignment of strings and scroll bars displayed in the list of the object.

Syntax

Object.Alignment [ = enAlignment ]

The Alignment property syntax has the following parts:

 

Name

Type

Description

Object

AListBox

AListBox control

enAlignment

enumAListBoxAlignment

An integer specifying the type of alignment

Where

enumAListBoxAlignment can be one of the following:

 

Name

Value

Description

albLeft

0*

Text is left aligned; the scroll bar is to the right.

albRight

1

The text is right aligned; the scroll bar is to the left. Supported if the current shell is Hebrew or Arabic (use WS_EX_LEFTSCROLLBAR | WS_EX_RIGHT | WS_EX_RTLREADING); otherwise it ignored.

Comments

Item text can be aligned to the left or to the right. This property can be set at design time as well as at run time.

Example

The following statement returns the alignment of strings and scroll bars displayed in the list of the AListBox:

llb1Alignment = lb1.Alignment

The following statement sets the alignment of strings and scroll bars displayed in the list of the AListBox:

lb1.Alignment = albRight

Applies to

AListBox

See Also

Height, Left, Top, Width