cancel
Showing results for 
Search instead for 
Did you mean: 

Are TouchGFX widgets scalable?

kweisi50
Associate II

Hi Martin,

I started to create a basic window with a background bitmap and some widgets, buttons and sliders but found I could not resize the widgets. I am missing something basic. In response to my last post you mentioned stickies, what are they?

Kind Regards

MikeZ

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

hi @kweisi50​,

Good question. In TouchGFX, the size of some widgets are governed by the assets associated with them. E.g. for Buttons, the size is fixed to the pressed and released images. Boxes are resizable. We have chosen to let the designer of the graphic be supreme in this case, because resizing images should be a graphics artists job and not the job of some approximating algorithm. It may not end up looking like you want it to. The Slider is also ruled by the size of its background and indicator images.

Does that make sense?

Best regards,

Martin

View solution in original post

8 REPLIES 8
Martin KJELDSEN
Chief III

hi @kweisi50​,

Good question. In TouchGFX, the size of some widgets are governed by the assets associated with them. E.g. for Buttons, the size is fixed to the pressed and released images. Boxes are resizable. We have chosen to let the designer of the graphic be supreme in this case, because resizing images should be a graphics artists job and not the job of some approximating algorithm. It may not end up looking like you want it to. The Slider is also ruled by the size of its background and indicator images.

Does that make sense?

Best regards,

Martin

Martin KJELDSEN
Chief III

I forgot to mention stickies. At the top of this list you'll find two pinned posts one of which has information on integrating hardware with TouchGFX:

https://community.st.com/s/question/0D50X0000AU4zodSQB/interfacing-with-hardware-in-touchgfx-applications

kweisi50
Associate II

Hi Martin,

I thought about your answer to my scalable widgets question, I do not understand it. Do you think you could elaborate further please.

Kind Regards

MikeZ

Hi Mike, sure.

Imagine that you're supplying an image to the designer which means the image has fixed dimensions. If you want to be able to resize the image in the designer we can do one of two things:

  1. Have the designer create a new temporary image for any resized image and possible more for resized widgets.
  2. Use a TextureMapper (expensive) to resize the image at run time

Neither of those options are very good in our eyes. Maybe for very simple images. But in the end you're altering the work of your graphics artist who most definitely designer the image to be exactly the dimensions it was supposed to be.

Does that make sense?

/Martin

kweisi50
Associate II

Hi Martin,

So what you saying is that I can supply the precise graphics for a widget and I using. Then the question is, what is the process of replacing the standard graphics of a widget? The steps for replacing the default graphics of a slider for example.

Kind Regards

MikeZ

Martin KJELDSEN
Chief III

Hi Mike,

In the properties area (right hand side of designer) you should see properties for slider and knob. Just pick new ones - Add new graphics to the project if you wish, and use those. Depending on the size of the knob for the slider, you can adjust it also using properties. These size of these assets will define the new size of the slider.

/Martin

kweisi50
Associate II

Hi Martin,

I will check it out, thanks.

Kind Regards

MikeZ

Martin KJELDSEN
Chief III

Okay, great. Let me know if you have any more doubts!

/Martin