There are dozen ways, surely. But if you do not know whether the original suggestion fits, how the heck are other people supposed to find out… You can’t possibly expect someone to iterate over all possibilities until something sticks. 
The screenshot you attached seems to be unrelated to what you are requesting.
Think about how the widget is supposed to know which 3 objects to show / hide. What is their relation with the widget? Are they placed in the level or spawned dynamically? Is this supposed to be modular or one-off action? Are there more than 3 of those objects in the scene?