N
N
Nazarevsky2021-06-21 14:09:40
C++ / C#
Nazarevsky, 2021-06-21 14:09:40

How to remove text padding in a button?

Hello!
I am writing an application on Windows forms and faced the following problem. There is a square button, I want to display one character as the text of the button, the size of the entire button, but when the text font size is increased, the text itself moves down.
Is there a way to remove this shift?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Bereznikov, 2021-06-22
@gdt

First of all, in such a situation, it makes sense to reduce Padding to 0 for all four sides.
If that's not enough, here is Reduce Padding Around Text in WinForms Button a few solutions to your problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question