Skip to main content
Ofaro.1
Associate III
August 27, 2021
Solved

TEXT PROGRESS Negative Values

  • August 27, 2021
  • 7 replies
  • 1886 views

Hi,

I'm trying to display the temperature values ranging from -40 to +40 on TEXT PROGRESS in TouchGFX designer. Unfortunately, the values range only starts from 0.

Can anyone help me with this? I'll be very grateful.

This topic has been closed for replies.
Best answer by Romain DIELEMAN

Hi,

You cannot directly work with negative values with a Text Progress widget. What I suggest to do is create your own Text progress by using a Box Progress widget instead and adding text over it with a textArea widget. That way you can display whatever text you need. For the box progress widget, if you need to go from -40 to 40degrees, then I would set the minimal value to 0 and the maximum value to 81 (-40 to 40 but dont forget the 0 degree value).

/Romain

7 replies

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
August 27, 2021

Hi,

You cannot directly work with negative values with a Text Progress widget. What I suggest to do is create your own Text progress by using a Box Progress widget instead and adding text over it with a textArea widget. That way you can display whatever text you need. For the box progress widget, if you need to go from -40 to 40degrees, then I would set the minimal value to 0 and the maximum value to 81 (-40 to 40 but dont forget the 0 degree value).

/Romain

Ofaro.1
Ofaro.1Author
Associate III
August 31, 2021

Hi Romain,

Thanks for your kind guidance. This is a great suggestion but I want to make one thing more clearer that how come the TextArea widget will update the text i.e. when the temperature will change for e.g. 15 C to 18 C ?

I also understand that the box Progress widget will update according to the values but I want to display temperature values if this makes sense.

I will be very grateful for your feedback.

Romain DIELEMAN
ST Employee
August 31, 2021

Hi,

You need to update the text Area yourself through code to change the value when relevant. I'll attach a project of what I had in mind.

/Romain