SimpleButton.ImageToTextAlignment Property
Gets or sets how the button’s image is aligned relative to the button’s text.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[Browsable(false)]
[DefaultValue(ImageAlignToText.None)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ImageAlignToText ImageToTextAlignment { get; set; }
Property Value
Type | Default | Description |
---|---|---|
ImageAlignToText | None | An ImageAlignToText enumeration value that specifies how the button’s image is aligned relative to the button’s text. |
Available values:
Name | Description |
---|---|
None | The image isn’t aligned relative to the label’s text. The alignment of the image is specified by the label’s appearance settings (LabelControlAppearanceObject.ImageAlign). |
LeftTop | The image is horizontally aligned on the left and vertically aligned at the top. |
LeftCenter | The image is horizontally aligned on the left and vertically aligned at the center. |
LeftBottom | The image is horizontally aligned on the left and vertically aligned at the bottom. |
RightTop | The image is horizontally aligned on the right and vertically aligned at the top. |
RightCenter | The image is horizontally aligned on the right and vertically aligned at the center. |
RightBottom | The image is horizontally aligned on the right and vertically aligned at the bottom. |
TopLeft | The image is vertically aligned at the top, and horizontally aligned on the left. |
TopCenter | The image is vertically aligned at the top, and horizontally aligned at the center. |
TopRight | The image is vertically aligned at the top, and horizontally aligned on the right. |
BottomLeft | The image is vertically aligned at the bottom, and horizontally aligned on the left. |
BottomCenter | The image is vertically aligned at the bottom, and horizontally aligned at the center. |
BottomRight | The image is vertically aligned at the bottom, and horizontally aligned on the right. |
Remarks
In addition to the button’s text (see SimpleButton.Text), you can display an image in the button (see SimpleButton.Image). The ImageToTextAlignment property specifies how the button’s image is aligned relative to the button’s text. If this property is set to None, the image is aligned relative to the button itself rather then the button’s text (see SimpleButton.ImageLocation);
If the button’s image is aligned relative to the button’s text, you can specify the indent between the image and text using the SimpleButton.ImageToTextIndent property.
The ImageToTextAlignment property is equivalent to the ImageOptions.ImageToTextAlignment property (see SimpleButton.ImageOptions).