I don't really understand what you want to do, but I can explain how it works and so you can then probably figure it out.
So, there are layers. The parent of all layers is layer 1. or in other words it is the base layer.
Then there are (can be) child layers. All layers have a layer number and a parent layer number.
When a layer is selected then it is visible and so it's child layers which are selected are also visible.
Ofcourse a child layer can't be visible if it's parent is invisible.
The items (elements) on a layer are visible when the layer is selected (visible).
It all works the same as tab controls in Windows Forms.