2025-09-25 10:45 AM
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.
Solved! Go to Solution.
2025-09-25 12:01 PM - edited 2025-09-25 12:05 PM
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?
2025-09-25 12:01 PM - edited 2025-09-25 12:05 PM
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?
2025-09-26 1:11 AM
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?
2025-09-26 7:22 AM
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.