Gets or sets the image alignment in the parent container (form or control).
object.PictureAlignment = [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.
Newlook Smartclient
Newlook Server
The PictureAlignment property is used to determine an image's alignment in relation to any caption text in the command button.
The Alignment Property, in contrast, 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.
If the command button does not have a caption, then the PictureAlignment property is used to determine an image's alignment in relation to the control.
The PictureAlignment property has no effect when PictureSize is set to PicSizeStretch or PicSizeTile (and little effect with PicSizeZoom) because the image is sized to take up the whole of the object, so alignment is not relevant.
The available settings for value for these controls are :
Constant (Macro) |
Constant (Script) |
Value |
Example |
Description |
PicAlignTop |
nlPicAlignTop |
0 |
![]() |
If the button has a caption the image will be positioned above the caption text. If the button has no caption, the image will be positioned in the top center of the control. |
PicAlignLeft |
nlPicAlignLeft |
3 |
![]() |
If the button has a caption the image will be aligned to the left of the caption text. If the button has no caption, the image will be positioned in the center left of the control. |
PicAlignCenter |
nlPicAlignCenter |
4 |
![]() |
(Default) If the button has a caption the image is centered behind the caption text. If the button has no caption, the image will be centered in the control. |
PicAlignRight |
nlPicAlignRight |
5 |
![]() |
If the button has a caption the image will be aligned to the right of the caption text. If the button has no caption, the image will be positioned in the center right of the control. |
PicAlignBottom |
nlPicAlignBottom |
6 |
![]() |
If the button has a caption the image will be positioned below the caption text. If the button has no caption, the image will be positioned in the bottom center of the control. |
The behavior of this property, as described above, was introduced in version 11.1. In any earlier versions, the command button's PictureAlignment property dictates the position of the image in the control, regardless of the position of caption text. The changes introduced in version 11.1, mean that you can change the alignment of a button's caption and the image will adjust accordingly.
Newlook Smartclient
Newlook Server
This property can be used in conjunction with the PictureSize property to specify how an image in a control is rendered when a form is re-sized.
This property is ignored in a Frame control if the Style property is set to FrameGroupBox.
This property is only applied when the PictureSize property is set to PicSizeClip.
The settings for value for the form, frame, picture box, list view and tab page objects are:
Constant (Macros) |
Constant (Scripts) |
Value |
Example |
Description |
PicAlignTopLeft |
nlPicAlignTopLeft |
0 |
![]() |
The image is aligned with the top left of the object. |
PicAlignTopCenter |
nlPicAlignTopCenter |
1 |
![]() |
The image is horizontally centered and aligned with the top of the object. |
PicAlignTopRight |
nlPicAlignTopRight |
2 |
![]() |
The image is aligned with the top right of the object. |
PicAlignLeft |
nlPicAlignLeft |
3 |
![]() |
The image is vertically centered and aligned with the left of the object. |
PicAlignCenter |
nlPicAlignCenter |
4 |
![]() |
The image is vertically and horizontally centered in the object. (Default) |
PicAlignRight |
nlPicAlignRight |
5 |
![]() |
The image is vertically centered and aligned with the right of the object. |
PicAlignBottomLeft |
nlPicAlignBottomLeft |
6 |
![]() |
The image is aligned with the bottom left of the object. |
PicAlignBottomCenter |
nlPicAlignBottomCenter |
7 |
![]() |
The image is horizontally centered and aligned with the bottom of the object. |
PicAlignBottomRight |
nlPicAlignBottomRight |
8 |
![]() |
The image is aligned with the bottom right of the object. |
DisabledPicture property | DownPicture property | HoverPicture property | Picture property | PictureColor property | PictureOpacity property | PictureQuality property | PictureSize property | PictureTile property
© 2004-2021 looksoftware. All rights reserved.