4 Replies Latest reply on Nov 8, 2012 12:13 PM by fabsav

    events on layers

      i've some "layers" (a stackPane with 2 anchor panes). the anchor pane in front contains only few objects, so i can view the other anchor pane.

      How can I perform a click on the second layer?

      thank you :)
        • 1. Re: events on layers
          Hi. There is a setMouseTransparent(boolean) on Node . Mouse events on node with mouseTransparent set to true will be ignored and
          captured by the topmost node below.
          • 2. Re: events on layers
            Also take a look at the node's pickOnBounds property if you did want to allow picking of the visible nodes in the topmost pane, but still allow picking of the nodes in the bottom pane when you click "between" the nodes in the topmost pane.


            From your description it would seem that you don't really need pickOnBounds and Shakir's suggestion of setMouseTransparent is what you want for your case.
            • 3. Re: events on layers
              i need to click on both layers... i think i solved using a group as top layer, instead of a pane.
              it allows to click nodes and ignore events in the "empty space" :)

              thank you both !
              • 4. Re: events on layers
                in effect your answer is the right one to my question as it is.