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.


    How to tell a TextView to scroll?

    Pythonista
    2
    4
    3300
    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.
    • starrshaw
      starrshaw last edited by

      Hi, I have info printing into text view.. but as I append new data it will not scroll the textview.. but just show 1 line of the new data and you have to scroll to see the rest manually with a finger scroll. Is there any way to fix this or am I stuck?

      1 Reply Last reply Reply Quote 0
      • abcabc
        abcabc last edited by

        See this example posted few days ago. (The scroll function is based on a post by JonB sometime ago).
        https://gist.github.com/balachandrana/6c8617382079e4486b12a4dd35f5c8c5

        1 Reply Last reply Reply Quote 0
        • starrshaw
          starrshaw last edited by

          Thanks Abcabc!

          1 Reply Last reply Reply Quote 0
          • starrshaw
            starrshaw last edited by

            Here is the only function you need to do the TextView scroll. The function will just read your 'textview' content and offset. Works great!

            def scroll():
            v['textview1'].content_offset = (0, v['textview1'].content_size[1] -v['textview1'].height)

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