cancel
Showing results for 
Search instead for 
Did you mean: 

TextAreaWithOneWildcard Scaling/Zooming

Wisse Pielage
Associate II

Hi,

Is it possible to zoom in on a text?

I'm trying to create a scrollList with the selected element larger than the rest.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

Hi,

Yes this is possible. One easy way if your text is already known and wont be changed would be to "cheat" by using an image of the text instead. You then use a TextureMapper widget to scale your image/text when you want.

The other solution I am not accustomed to 😅, I've never dived into the code. You can have a look at the Board Specific Demo called "STM32H7B3I Evaluation Board Text Animation". When running the demo look at the advanced animations. In TouchGFX Designer and the code look look at the Container "advancedAnimationContainer" and the "scalingTextTextureMapper" implementation.

/Romain

View solution in original post

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

Yes this is possible. One easy way if your text is already known and wont be changed would be to "cheat" by using an image of the text instead. You then use a TextureMapper widget to scale your image/text when you want.

The other solution I am not accustomed to 😅, I've never dived into the code. You can have a look at the Board Specific Demo called "STM32H7B3I Evaluation Board Text Animation". When running the demo look at the advanced animations. In TouchGFX Designer and the code look look at the Container "advancedAnimationContainer" and the "scalingTextTextureMapper" implementation.

/Romain

Romain DIELEMAN
ST Employee

Otherwise if you are not looking for an animation but just have a different size you can also add use an additional typographie with the same font but just larger which you use for the selected element.

/Romain

Wisse Pielage
Associate II

Thanks for the quick anwsers!

It's going to be a kinda big menu, so I'd prefer to use text instead of a different image for each entry. But I'll keep it in mind.

I've tried with a differend typography, but it left some artifacts at the sides.

But as I wrote this, I had an idea what might be wrong. I did a resize on the smaller text before invalidating, which left everything that's outside of the new area as it was. Doing the resize later clears the entire area.

I will also take a look at the demo for animating, but for now, this does the trick!

Wisse