Skip to main content
Soner
Associate
April 21, 2026
Question

TouchGFX Button with Label Text position problem

  • April 21, 2026
  • 1 reply
  • 87 views

Hi,

When using this, single-character text isn't perfectly centered on the button,
the letter appears slightly higher.
Also, characters like .,_ appear higher than they should.
Is it possible to adjust the text position horizontally when using these?

 

1 reply

ST Employee
April 22, 2026

Hello @Soner.

The text is displayed according to how the font is defined. For most fonts, there will be a top margin for Latin characters. I have included a screenshot below, where you can clearly see that the text is not vertically centered when used in a text area with auto size enabled, and it is effectively the same that happens when used in a Button With Label widget.

JohanAstrup_0-1776839203829.png

I don’t think there is an easy workaround for this specific widget. However, what you could do - and what I usually do myself - is to use a Flex Button instead. This widget is much more versatile and allows you to manually control the position of the text within the button. That makes it possible to compensate for the top margin above the characters.

I’m also a bit interested in the other issue you mention, where ".,_" appear slightly higher than they should. Could you please clarify what you mean and share a screenshot? I haven’t been able to reproduce it.

Best regards,
Johan

Amel NASRI
Technical Moderator
May 4, 2026

test most recent activity

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.