Background
I am trying to build a image gallery based on the description here.
I have a StackPane
, with ScrollPane
and AnchorPane
as its children, added in the same order.
ScrollPane contains a list of images contained in ImageView's, while the Anchorpane has two buttons, anchored to the left and right corners, to scroll the images !
Problem
The scrolling is working fine, as the buttons are placed on the AnchorPane, which is the top child on the StackPane.
I want to implement the double-click on the imageView to open it in fullscreen. Since the imageView is a child of ScrollPane, it is not able to listen to the mouse event.
Is there a way through which I can make the ImageView listen to the mouseEvent ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…