cancel
Showing results for 
Search instead for 
Did you mean: 

An affective way to manage multiple widgets groups

Jtron.11
Senior

Hi all,

Can anyone give me a pointer of how-to organize and manage a group of widgets so I can enable and disable whole group together?

If I have a group of buttons, gauge, text fields widgets and I need two different groups that overlap each other so I have to enable one and disable the other group and vice versa base on one toggle button states.

I tried the containers method but unfortunately there are so many details that each group has to be differently so I can't implement the container.  Each group has about 20 widgets, and it is just a mess (for me) to make these 20 widgets setVisible(true) vs. setVisible(false).

Do any of you know how to organize these widgets as a group? So I can setVisible once for every widgets in the group?

Thank you for your time.

1 ACCEPTED SOLUTION

Accepted Solutions
ferro
Lead

Hi @Jtron.11 

 

"I tried the containers method but unfortunately there are so many details 
that each group has to be differently so I can't implement the container."

This is what I would do as well, and I don’t understand why it doesn’t work in your case. Once the widgets are in the Container, you call Container.setVisible () and job done.

Did you try the approach on a simple example?

 

View solution in original post

3 REPLIES 3
ferro
Lead

Hi @Jtron.11 

 

"I tried the containers method but unfortunately there are so many details 
that each group has to be differently so I can't implement the container."

This is what I would do as well, and I don’t understand why it doesn’t work in your case. Once the widgets are in the Container, you call Container.setVisible () and job done.

Did you try the approach on a simple example?

 

Osman SOYKURT
ST Employee

Hello @Jtron.11 ,

I agree with @ferro , the container approach seems to match with what you need. Could you try using the setVisible() function with the container you want to hide/show?

Osman SOYKURT
ST Software Developer | TouchGFX

Thank you for your suggestion.  I did try the container method, but I gave up because there are many differences in the instance, but reading your comment asking myself, why I have to stick with 1 containers, I can create 2 3 different container with different requirements.  Thank again.