I have BorderPane with left and center part, both are ScrollPanes. How to scroll them with one scrollbar ( vertical ). Or how to get access to one of the ScrollBars ?
相关问题
- I get an exception when trying to swap elements in
- JFX scale image up and down to parent
- Dragging an undecorated Stage in JavaFX
- JavaFX sample issue
- How to change the font size in ListView in JavaFX?
相关文章
- Low quality icon in taskbar of a Stage. JavaFX
- Loading custom font using JavaFX 8 and css
- Javafx Platform.runLater never running
- JavaFX scrolling table update performance degrades
- Javafx select multiple rows
- Escape from a Number TextField in a JavaFX dialog
- How to merge cells in JavaFX Scene builder?
- Adding view with constructor arguments to a border
The answer of @invariant did not work for me. But the code written below worked out.
With the binding two components to each other, they scroll together horizontally. It would work for vertical case.
you can bind scrollpane1(sp1) vScrollBar property and set the changed value to other scrollpane vScrollbar property.
Sample code : this code automatically changes SP2 vScrollbar position when Sp1 vScrollbar position chnaged.
Hint to get one scrolll bar to scroll two Scroll panes : Define a vertical scroll bar and then hide ( may be set opcaity to Zero or something ..) vscrollbars for two Scrollpanes. and then bind to defined scrollbar changes and set that chnaged values to both scrollpanes vscrollbars like above.