cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an alternative to ButtonWithLabel in Touchgfx?

TLe.4
Associate II

I am using TouchGFX ButtonWithLabel widget to have text within my buttons. It requires Resource texts and the function setLabelText() has TypedText as an argument. I want to replace the label with my own custom string which can change during runtime and is not predictable (can't use resources). Is there a way to implement a button with text over it which can be changed anytime like a wildcard?

1 ACCEPTED SOLUTION

Accepted Solutions
TLe.4
Associate II

Ended up going with Button and TextArea wildcard over it. This would be a much simpler solution compared to creating new text resource IDs for a blackbox system with constantly changing requirements. It was decided that a wildcard textArea could be written to dynamically during runtime is a simpler and easily maintainable solution.

However, my concern would be the impact on memory usage, RAM in particular, since the STM32 discovery board I'm using is limited to 192kB. My understanding is that the images and text database is stored in flash but that would mean data retrieved during runtime such as the wildcard single use texts will use up all the RAM space, which is happening right now.

View solution in original post

1 REPLY 1
TLe.4
Associate II

Ended up going with Button and TextArea wildcard over it. This would be a much simpler solution compared to creating new text resource IDs for a blackbox system with constantly changing requirements. It was decided that a wildcard textArea could be written to dynamically during runtime is a simpler and easily maintainable solution.

However, my concern would be the impact on memory usage, RAM in particular, since the STM32 discovery board I'm using is limited to 192kB. My understanding is that the images and text database is stored in flash but that would mean data retrieved during runtime such as the wildcard single use texts will use up all the RAM space, which is happening right now.