Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinForms button with image and text

Tags:

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.

like image 668
rhughes Avatar asked Jul 12 '13 09:07

rhughes


People also ask

Which property is used to display image on the button in C#?

The ImageAlign and TextAlign properties of Button are used for this purpose.

Which event occurs before the form is displayed?

Load: This event occurs before a form is displayed for the first time.


1 Answers

Just found it.

You need to set:

ImageAlign to MiddleRight

TextImageRelation to ImageBeforeText

TextAlign as MiddleCenter

like image 117
rhughes Avatar answered Oct 03 '22 23:10

rhughes