0

Me, being a newbie to both coding and Tkinter, could not figure out what any of the similar posts on this meant nor how to adapt them to my own purposes, nor whether they would work for me at all. So sorry if someone already answered this question, I checked on several sites and this site.

Essentially, I was hoping to be able to create a text scrolling animation on a text widget in Tkinter. For example, if you are confused about what I am talking about, I got the idea from a python game here, check it out to see what I mean: https://repl.it/talk/share/Yellow-Stone-Zombies-An-Apocalypse-Game-300-Cycles-Special/37364

However, I could not use the bit of code that the person who made that game used as it corresponded to the print function, not Tkinter in any way.

Does someone know how to achieve this on a TEXT WIDGET, NOT A CANVAS OR LABEL??? Thank you so much if you do, I have no code to show here because I literally do not know where to start, sorry if there is an obvious solution and I'm just so newbie that I don't see it.

EDIT: The question was answered in the comments.

Viv
  • 9
  • 3
  • Scroll?I could only see it show the character one by one. – jizhihaoSAMA May 25 '20 at 08:51
  • You want something like this: [tkinter: how to use after method](https://stackoverflow.com/a/25753719/7414759). Usa a `Text` instead of `Label`. Read up on [The Tkinter Text Widget](http://effbot.org/tkinterbook/text.htm) – stovfl May 25 '20 at 10:36
  • I looked at the first link and ran it, but it looked as if I would need to use multiple widgets. What I was hoping for was use of animation in one widget. I could not look at the second one for a few reasons, mostly due to computer issues :( – Viv May 25 '20 at 17:28
  • Also, jizhihaoSAMA, that is what I meant, sorry for any confusion. – Viv May 25 '20 at 17:31
  • ***need to use multiple widgets.***: The linked example uses multiple, you have to create your widget outside the after function and append/update the contents. [Edit] your question and show your attempt. – stovfl May 26 '20 at 08:42
  • Oh ok , that worked. However, I can't mark that as an answer so as you suggested I will edit my answer. – Viv May 26 '20 at 15:41

0 Answers0