0 Replies Latest reply: Dec 11, 2012 4:16 AM by 976729 RSS

    Event dispatching to ScrollPane placed under overlay pane

      Hi all,

      I have layered pane structure like this:
      StackPane wStack = new StackPane();
      ScrollPane scroll = new ScrollPane();
      Region overlay = new Region();
      wStack.getChildren().addAll(scroll, overlay);
      And need to handle mouse events by elements on overlay and then by scroll,
      when I put overlay over scroll it handle all mouse events,
      overriding of buildEventDispatchChain in overlay helps to propagate events to scroll
          public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
              return super.buildEventDispatchChain(tail);
      I see it by handling scroll.setOnMouseClick() and it work,
      but scroll control itself still does not work (not react on mouse)