Skip to main content
Ezgi
Associate III
November 16, 2021
Question

How to know active container?

  • November 16, 2021
  • 1 reply
  • 612 views

Hi,

I have two containers on my screen. Two of them is visible. However I want to know which one is appearing on the screen. Is there a function about it or a way?

This topic has been closed for replies.

1 reply

Yoann KLEIN
ST Employee
February 24, 2022

Hello @Ezgi Şanver​ ,

I'm not sure to understand exactly why you want to know programmatically which element is appearing on the screen. Can you provide me the user case ?

But, if you want to control which element is appearing or not on the screen, you can use the setVisible(bool) method from the Drawable class.

Otherwise, in TouchGFXDesigner, the order in which you place the elements in the "widget list" has an influence on which the element is in foreground or in background on the screen. For example :

0693W00000KaNYNQA3.pngHope that this helped you,

/Yoann

Yoann KLEINST Software Developer | TouchGFX