Radonjic Lazar
Radonjic Lazar

Reputation: 23

How to bind Circle CenterX and Slider Value

Got problem when I tried to bind a slider with a circle centerX, and don't know how to solve it... So the ball has to go from left to right, with an animation(i guess that an animation is the best solution for that) and the slider has to return the ball somewhere in the scene, but the slider doesn't follow the movement of the ball while the animation is playing... Any help is appreciated.

Upvotes: 0

Views: 78

Answers (1)

vl4d1m1r4
vl4d1m1r4

Reputation: 1781

In order to bind two values together you need to use bindBidirectional method instead of bind. Also when you put a node in a container like the BorderPane it layouts the children based on some rules. If you want to manage the position of the circle yourself you will have to specify the intention with cr.setManaged(false).

Upvotes: 1

Related Questions