Thank you both! It works now
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.
Latest posts made by AAnkeriasniemi
-
RE: TextView to scroll automatically when text is added?
-
TextView to scroll automatically when text is added?
Hello
What I’m trying to do is a console view for the ui. It wouldn’t be that nice for it to not scroll when something is printed out of the bounds, in this case the user would have to scroll down manually every time text is printed.
An obvious solution to this would be to print so that the old text would go out of the bounds, and new text would be printed above the old. But I don’t want this because that’s not how a standard console works like and can confuse many users: textview.text = f”{newtextstring}\n{textview.text}”
This is the current method for me to print text to the makeshift console:
def fakeprint(newtextstring): consoletextview.text = f”{consoletextview.text}\n{newtextstring}”
but because there will be be so many rows after the print-text height has reached the textview-height that the print-text will continue downwards and then the user will have to scroll down manually to see new prints. Basically, I want it to scroll along with new prints so that the user won’t have to, any ideas?
Let me know if you can’t understand this.