Returns or sets a value that determines the alignment of text in a control, values in a column of a data grid control, values in the column header of a list view control or tabs in a tab control.
object.Alignment = [value]
Where object is an object expression that evaluates to one of the controls in the Applies To list, and value is a value or constant as described in Settings below.
Newlook Smartclient
Newlook Server
None. Supported in both Material and Classic skin.
The Alignment property is used to determine how text will be aligned within the text portion of the control once the user has exited the control.
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The available settings for value for these controls are :
Constant (Macro editor) |
Constant (Script Editor) |
Value |
Description |
AlignLeft |
nlAlignLeft |
0 |
(Default for inserted controls) Text is left aligned. |
AlignRight |
nlAlignRight |
6 |
Text is right aligned. |
For host generated controls, the default alignment is derived from the control's Format property, as determined by the recognition engine. If the control is recognized as a NumShift, NumOnly, DigitsOnly or SignedNum field, then its alignment will default to AlignRight. For all other format settings, the alignment property will default to AlignLeft.
Newlook Smartclient
Newlook Server
None. Supported in both Material and Classic skin.
The Alignment property is used to determine how caption text will be aligned within the control.
From version 11.1 onwards (for command buttons only where Picture or HoverPicture is also specified) the Alignment property is used to set the alignment of both the caption and picture, which are treated as one visual entity. For example, if a command button's Alignment is set to AlignBottomLeft, and the PictureAlignment property is set to PicAlignRight, then the image will be positioned to the right of the caption, and then the block that consists of the caption and image will be positioned in the bottom left of the control.
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The available settings for value for these controls are :
Constant (Macro Editor) |
Constant (Script Editor) |
Value |
Description |
AlignTopLeft |
nlAlignTopLeft |
0 |
Text is left aligned at the top of the control. |
AlignTopCenter |
nlAlignTopCenter |
1 |
Text is centered at the top of the control. |
AlignTopRight |
nlAlignTopRight |
2 |
Text is right aligned at the top of the control. |
AlignLeft |
nlAlignLeft |
4 |
(Default for label) Text is left aligned in the middle of the control. |
AlignCenter |
nlAlignCenter |
5 |
(Default for command button) Text is centered in the middle of the control. |
AlignRight |
nlAlignRight |
6 |
Text is right aligned in the middle of the control. |
AlignBottomLeft |
nlAlignBottomLeft |
7 |
Text is left aligned at the bottom of the control. |
AlignBottomCenter |
nlAlignBottomCenter |
8 |
Text is centered at the bottom of the control. |
AlignBottomRight |
nlAlignBottomRight |
9 |
Text is right aligned at the bottom of the control. |
AlignNumeric |
nlAlignNumeric |
3 |
Text is aligned according to the position of the decimal point. |
The AlignNumeric value is only appropriate for host-generated controls where the field content is numeric. In all other cases, AlignNumeric behaves the same way as AlignTopLeft.
Newlook Smartclient
Newlook Server
None. Supported in both Material and Classic skin.
The Alignment property is used to determine how text will be aligned within the column.
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The available settings for value for these controls are :
Constant (Macro Editor) |
Constant (Script Editor) |
Value |
Description |
AlignLeft |
nlAlignLeft |
0 |
(Default) Text is left aligned in the cell. |
AlignRight |
nlAlignRight |
6 |
Text is right aligned in the cell. |
AlignCenter |
nlAlignCenter |
5 |
Text is centered in the middle of the cell. |
Newlook Smartclient only.
None. Supported in both Material and Classic skin.
The Alignment property is used to determine how text will be aligned within the list view column's header.
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The available settings for value for these controls are :
Constant (Macro Editor) |
Constant (Script Editor) |
Value |
Description |
AlignLeft |
nlAlignLeft |
0 |
(Default) Text is left aligned in the column header. |
AlignRight |
nlAlignRight |
6 |
Text is right aligned in the column header. |
AlignCenter |
nlAlignCenter |
5 |
Text is centered in the middle of the column header. |
Newlook Smartclient only.
Note that the Alignment property is not supported for the Tab control in Newlook Server. Tab buttons will render across the top of the control, regardless of what this property is set to.
Under the material skin, only the TabAlignTop and TabAlignBottom values are supported for this property.
The Alignment property is used to determine how tabs will be aligned in the control.
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The available settings for value are :
Constant (Macro Editor) |
Constant (Script Editor) |
Value |
Description |
TabAlignTop |
nlTabAlignTop |
0 |
(Default) Tabs are generated along the top of the Tab control. |
TabAlignBottom |
nlTabAlignBottom |
1 |
Tabs are generated along the bottom of the Tab control. This setting is not supported in Newlook Server. |
TabAlignLeft |
nlTabAlignLeft |
2 |
Tabs are generated along the left side of the Tab control. This setting is not supported in Newlook Server or the material skin - if . |
TabAlignRight |
nlTabAlignRight |
3 |
Tabs are generated along the right side of the Tab control. This setting is not supported in Newlook Server or the material skin. |
Format property | AlignToGridColumn property | PictureAlignment Property
Column Header object (ListView)
© 2004-2021 looksoftware. All rights reserved.