Skip to main content
Associate II
May 6, 2024
Question

Flex Button with SVG Icon

  • May 6, 2024
  • 2 replies
  • 1350 views

Hi,

The only way I can find to use a custom SVG as an Icon for a Flex Button is to add it to the Theme library.

As a workaround I created folder in the  ..\designer\Themes\icon_theme\images\Themes directory and copied the SVG there. eg 

C:\TouchGFX\4.23.2\designer\Themes\icon_theme\images\custom\example.svg

It seems to work ok but it is cumbersome. Is there a way to store the SVG with the projects assets or have I missed something?

Cheers,

Dan

 

 

2 replies

ST Employee
May 15, 2024

Hello @codebuk ,

Thank you so much for pointing out this issue. 
Yes, unfortunately, there is no simple way to add an SVG to a flex button from the project images. We will fix this issue as soon as possible. 

Best regards,

ST Employee
June 26, 2024

Hello @codebuk ,

Sorry for the late response.
After discussing with the team, we have decided not to implement this feature for now. So, I suggest converting your SVGs to PNGs, or creating a custom container with an SVG and a flex button where the width and height of the flex button's Visual Element is set to zero. 

Setting the visual element of the flex button to 0Setting the visual element of the flex button to 0

I hope this helps!