xsharp.eu • Alignment & size of Wingdings character on Winforms button
Page 1 of 1

Alignment & size of Wingdings character on Winforms button

Posted: Wed Apr 05, 2023 3:15 pm
by ic2
These 2 equally sized pushbuttons both have a Wingdings character as Text on a Winforms form.

The right button is Wingdings 20 pt with TextAlign MiddleCenter. This looks good to me. BTW, it fits a bit better on 18 pt and then it still centers.

The left button is Wingdings 26 pt with TextAlignTopCenter. It does not look good, because it doesn't use nearly half of the upper part of the button. Changing from MiddleCenter to TopCenter doesn't even make any difference. Changing it (also) to Wingdings 20 pt does center the picture but it then looks considerably smaller than the character on the right button with the same point size. Enlarging it (as I did in the picture, to 26 pt) pushes it down on the button with no (obvious) way to center it, which should make it more visible.

Did anybody experience the same, and is there some explanation (or better: solution) for this?
2WingDings.jpg
2WingDings.jpg (2.99 KiB) Viewed 662 times
Dick

Alignment & size of Wingdings character on Winforms button

Posted: Thu Apr 06, 2023 4:23 pm
by TerryB1
Dick

I am not in a position to try this at the moment, but what you are seeing seems to be consistent with what I would expect.

The image in the offending Wingding has already been positioned. You need a different Wingding.

The image in the other Wingding (What is it a letterbox?) has already been positioned centrally.

I did take a quick look at Wingdings but couldn't find anything suitable. Some hands perhaps and convert to png's or jpegs? Not tried this on buttons, but maybe it's worth a go.

Terry

Alignment & size of Wingdings character on Winforms button

Posted: Thu Apr 06, 2023 9:16 pm
by ic2
Hello Terry,

Thanks for your reply on this pretty odd subject!

I am not sure if it is 'as to be expected' that the lay-out / positioning of different Wingding characters differs.
But you are of course correct that I basically should add pictures. It's probably just laziness :P that I wanted to just use Wingdings.

Dick

Alignment & size of Wingdings character on Winforms button

Posted: Fri Apr 07, 2023 8:33 am
by TerryB1
Hi Dick

Just a thought: Try changing the Background colour of your TextBlock, it may help to show what is happening.

Terry