Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Reset the scrollbar of the Scrollview when it overflows?
-
"ScrollView.bounces
A boolean value that controls whether the scroll view bounces past the edge of content and back again."But when I set the position of the scrollbar past the edge with code(scrollview.content_offset=(x,y)), it is stuck and can't be reset by itself.
-
@lpl, you can obviously avoid going past your content size programmatically, so I am assuming you want to create a bounce-like effect without the user doing the scrolling?
If that is the case, I would use Scripter (yes, that thing again) with one of the included easing functions to animate the bounce back to the end of content.
-
@mikael Thx. But I just made it with python again. … By using "ui.animate(reset_scrollbar, 0.5)".
-
@lpl, excellent, simple is often the best. My pain with ui.animate and ui.delay comes when I have to run several things in parallel or sequence, or when I need to apply easing functions for a more natural feel.
As an aside, I feel obliged to point out that the Scripter is also 100% Python.
-
@mikael Yeah. I'll try. The ui module in pythonista is still not kind of friendly towards me.