2026-06-03 2:03 AM
Is there a function to get the currently set ID in the SVGImage widget?
Solved! Go to Solution.
2026-06-03 11:58 PM
Hello @yutajeng.
Currently, such a function is not implemented. However, based on your request, I will implement it targeted for TouchGFX 4.27.0.
In the meantime, you can implement it yourself quite easily by modifying the SVGImage.hpp file, since the TouchGFX widgets are open source. You can find the file here in your TouchGFX project:
The framework files will only be overwritten or regenerated if you manually delete them, so the change will persist.
You should implement this function in the public section of the SVGImage class:
uint16_t getSVGId() const
{
return svgId;
}Best regards,
Johan
2026-06-03 11:58 PM
Hello @yutajeng.
Currently, such a function is not implemented. However, based on your request, I will implement it targeted for TouchGFX 4.27.0.
In the meantime, you can implement it yourself quite easily by modifying the SVGImage.hpp file, since the TouchGFX widgets are open source. You can find the file here in your TouchGFX project:
The framework files will only be overwritten or regenerated if you manually delete them, so the change will persist.
You should implement this function in the public section of the SVGImage class:
uint16_t getSVGId() const
{
return svgId;
}Best regards,
Johan
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.