WinForms button with image and text
Asked Answered
K

2

26

I have a standard button on my WinForm with some text and an image. It looks like this:

Button

How can I set the button so that the image is aligned just to the left of the text? I have tried ImageAlign, but that doesn't seem to take into account the button's text.

Karleenkarlen answered 12/7, 2013 at 9:13 Comment(0)
K
42

Just found it.

You need to set:

ImageAlign to MiddleRight

TextImageRelation to ImageBeforeText

TextAlign as MiddleCenter

Karleenkarlen answered 12/7, 2013 at 9:15 Comment(0)
H
15

For that you can use TextImageRelation Property to set it to ImageBeforeText:

Specifies that the image is displayed horizontally before the text of a control.

enter image description here

Horrified answered 12/7, 2013 at 9:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.