Skip to main content
JPabl.1
Associate III
September 24, 2024
Question

How to add % to a text widget

  • September 24, 2024
  • 1 reply
  • 642 views

Hi there TouchGFX team. 

 

I need to print a percentage value on a text widget. The progress bar doesn't fit me, I just need the value to be displayed. 

This is done in the widget configuration or is done in code by the dev concatenating the "value" + "%" ?

Thanks a lot in advance

1 reply

GaetanGodart
Technical Moderator
December 16, 2024

Hello @JPabl.1 ,

 

To display something like "15%" or "2%", you can simply add a wildcard to your textArea followed by the % sign :

GaetanGodart_1-1734353229636.png

Make sure to add "0-9" in the wildcard range of the typography used for the textArea :

GaetanGodart_0-1734353204691.png
Then you can change the value of the wildcard in code.

 

Please find attached an example of this.

 

Regards,