user6129465
user6129465

Reputation:

Split Pane divider change listener javafx

I have two split panes which both have a vertical split . I`m trying to add a listener between the two divider so that when i move one split pane the other will move .

Upvotes: 1

Views: 800

Answers (1)

James_D
James_D

Reputation: 209684

Basically:

SplitPane sp1 = ... ;
SplitPane sp2 = ... ;

// populate split panes...

// now bind divider positions:  
sp1.getDividers().get(0).positionProperty().bindBidirectional(
        sp2.getDividers().get(0).positionProperty());

Upvotes: 2

Related Questions