Page 1 of 1

Auto enable/disable scrollbar on viewport

Posted: Wed Jul 04, 2018 10:04 am
by rames44
Given a viewport on a screen that contains a vbox, where the vbox will have a variable number of items, where the items themselves will be of variable height.

Is there a way to automatically detect whether the child content of the viewport (i.e. the vertical height of the vbox) exceeds the viewport size and automatically enable/disable the vertical scrollbar on the viewport based on this? Visually, I would like to have the scrollbar appear when the viewport is scrollable, but be hidden when it isn't needed.

(Apologies if this is already covered here somewhere - my Google Fu wasn't up to finding it.)

Re: Auto enable/disable scrollbar on viewport

Posted: Sun Jul 08, 2018 10:29 pm
by PyTom
Yes, that's the purpose of the "unscrollable" property.

https://www.renpy.org/doc/html/style_pr ... scrollable