omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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?

    Pythonista
    2
    5
    1972
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by A Former User

      "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.

      mikael 1 Reply Last reply Reply Quote 0
      • mikael
        mikael @Guest last edited by

        @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.

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @mikael last edited by

          @mikael Thx. But I just made it with python again. … By using "ui.animate(reset_scrollbar, 0.5)".

          mikael 1 Reply Last reply Reply Quote 0
          • mikael
            mikael @Guest last edited by

            @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.

            ? 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @mikael last edited by

              @mikael Yeah. I'll try. The ui module in pythonista is still not kind of friendly towards me.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors