Python Forum

Full Version: Homework/tkinter/python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So,
I'm making a game, where mathematical operation displays on screen (+-/*) and you have to answer to this.
Now I have a problem.
[Image: 25323880_1737092623009353_643139051_n.png]
The old number remains there, my friend told me to change label but I don't know where... I have some other problems aswell, so I think it would be easier to talk somewhere else (facebook, skype etc).

https://gist.github.com/anonymous/3d7fe1...3ccc0620b3
The problem starts from line 1001 (def update():)
Ok, so what you do currently, is you create a new label each time you run update().  So if the old label is wider than the new one, you can still see it.

Quote:
    tehe= ttk.Label(raam, text=str(tehe), foreground = 'black', background='white', font='none 60 bold')
    tehe.place(x=20, y=100)

It sounds like what your friend is suggesting (and what I also am suggesting), is that you stop creating new labels, and instead only have one, which you change the text to.
Where do I put this codeline and what I have to change? Sorry not so good in python yet :D