Question

I have a vbox with 11 canvases inside of it. The user is given the option to show/hide any one of the 11 canvases at any time. When the user selects to hide one of the canvases, I would like to have everything else after it shift up. For example, if all 11 canvases are currently showing, and the user selects to hide canvas 8, I would want canvases 9 through 11 to shift up the height of canvas 8. I've tried simply setting canvas 8's visible property to be false, but that's not working.

What's the best way to ensure that all canvases (after the one selected to be hidden) shift up?

Thanks in advance, Brds

Was it helpful?

Solution

Set its includeInLayout property to false, otherwise the VBox will still use it for layout measurements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top