I have a list of tkinter widgets that I want to change dynamically.
How to delete the widgets from the window?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can call
pack_forgetto remove a widget (if you usepackto add it to the window).Example:
If you use
pack_forget, you can later show the widget again callingpackagain. If you want to permanently delete it, calldestroyon the widget (then you won’t be able to re-add it).If you use the
gridmethod, you can usegrid_forgetorgrid_removeto hide the widget.