Thank you for this infromation. I am aware of the SwitchLayer function and have tested with it. While you can use the control method to switch from say layer 3 and layer 4 it does not allow you to switch it back using the same button. To use this SwitchLayer function or the TurnOnLayer/TurnOffLayer function requires two buttons to do what I would like.
I have to have a button to hide layer 4 and then another button to display it.
What I am trying to do is hide a bunch of labels in a panel and then based upon a single button, either display them or hide them. This is for a maintnenance screen.
you could use a global variable (defined at the scope lib of the panel) where you save the last state. When the button is clicked again the variable is read and the other layers are set visible/invisible.