java - JavaFX 8 Conditional ScrollBars on shrinkable Pane -


i want "combine" 2 different behaviors in 1 of panes:

0) if containing scene bigger maximum pane occupy top-left corner, using maximum dimensions. normal behavior.

1) shrinking scene pane adapts shrinking contents, no scrollbars. normal behavior of e.g.: migpane.

2) if scene (or containing pane) shrinks below minimum dimension contents not shrink anymore, scrollbars appear. scrollpane behavior.

i did not find way combine behavior (1) , (2). using scrollpane contained migpane not try shrink.

any suggestion? tia

setting properties fittoheight , fittowidth trick.

either use:

scrollpane scrollpane = new scrollpane(); scrollpane.setfittoheight(true); scrollpane.setfittowidth(true); 

or, in fxml:

<scrollpane fittoheight="true" fittowidth="true"> 

this way enclosed node takes charge: if can resized (it implements resizable) , until can resized (it reaches minheight or minwidth) will resized; otherwise normal scrollpane (3) behavior takes on , scrollbars appear.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -