How to erase labels from python? | Sololearn: Learn to code for FREE!

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.

11/12/2017 5:17:04 PM

AnonymousPug 55

2 Answers

New Answer

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

0

from which widget you want to erase label?