0

How to erase labels from python?

Hey SoloLearn community. I was attempting to make a game in python 3 with tkinter but could not figure out how to delete labels. Please help if you know the answer.

12th Nov 2017, 5:17 PM
AnonymousPug 55
AnonymousPug 55 - avatar
2 odpowiedzi
0
from Tkinter import * def changebutton(): but.destroy() secondbut=Button(root,text="changed") secondbut.pack() if __name__=='__main__': root=Tk() global but but= Button(root,text="button",command=changebutton) but.pack() root.mainloop() https://stackoverflow.com/questions/9879255/is-there-any-way-to-delete-label-or-button-from-tkinter-window-and-then-add-it-b
12th Nov 2017, 5:29 PM
~Sudo Bash
~Sudo Bash - avatar
0
from which widget you want to erase label?
21st Feb 2018, 7:17 PM
Gourinda Adil
Gourinda Adil - avatar