# What is the syntax for selecting multiple layers in an Overlay?

From the documentation:

Overlay[{Subscript[expr, 1],Subscript[expr, 2],...},{i,j,...},s] allows selections to be made and controls to be clicked in Subscript[expr, s].

and an example of selecting one layer:

Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All, 1]


Does anyone know what the syntax is for cases in which you want controls to be clicked in more than one layer, or all layers?

I have tried:

Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All, All]


and

Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All, {1,2}]


without success.

-
As far as I'm concerned nothing in the phrasing of the documentation suggests that you should be able to use more than one layer for selections. –  Sjoerd C. de Vries Jun 17 '12 at 7:30
@SjoerdC.deVries I'd agree but sometimes in these situations that reflects inadequate documentation rather than inadequate functionality. –  Mike Honeychurch Jun 17 '12 at 22:40
lol.. Mike, I just tried doing exactly this. –  Amatya Sep 25 '12 at 2:23

I don't think the third argument of Overlay can be used to do what you want. An alternative is to change the active layer dynamically using EventHandler as in

 DynamicModule[{layer = 1},
EventHandler[
Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All,
Dynamic[layer]], {{"MouseClicked",  2} :> ((layer = layer /. {1 -> 2, 2 -> 1}))},
PassEventsDown -> True]]

-
thanks for the thoughts on a work around. I am primarily hoping that this can be done with existing options before exploring alternatives. It seems like an oversight if it cannot be done. –  Mike Honeychurch Jun 17 '12 at 3:35
Correct, WRI tech support advise that you can only have one "active" layer. This is disappointing because if you design an interface with multiple layers where the embedded controls in each layer are visually separated -- despite layers being overlayed -- it would be nice to have all controls active. –  Mike Honeychurch Jun 23 '12 at 1:52
@Mike, thank you for the accept. –  kguler Jun 23 '12 at 5:52