Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68903 > unrolled thread
| Started by | eneskristo@gmail.com |
|---|---|
| First post | 2014-03-24 13:30 -0700 |
| Last post | 2014-03-25 14:03 -0300 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
How to clear all content in a Tk() eneskristo@gmail.com - 2014-03-24 13:30 -0700
Re: How to clear all content in a Tk() Marcel Rodrigues <marcelgmr@gmail.com> - 2014-03-25 14:03 -0300
| From | eneskristo@gmail.com |
|---|---|
| Date | 2014-03-24 13:30 -0700 |
| Subject | How to clear all content in a Tk() |
| Message-ID | <0ed94669-6c1e-4e2f-b79d-33bed8cdde15@googlegroups.com> |
I have this program, and since I want to change stuff dynamically, I want to fully clear the root = Tk(), without deleting it. Is there a way to do so?
[toc] | [next] | [standalone]
| From | Marcel Rodrigues <marcelgmr@gmail.com> |
|---|---|
| Date | 2014-03-25 14:03 -0300 |
| Message-ID | <mailman.8527.1395767012.18130.python-list@python.org> |
| In reply to | #68903 |
[Multipart message — attachments visible in raw view] — view raw
What about this: Put a Frame() inside the root: `frame = Frame(root)`. This frame will be the only immediate child of root. Everything else will be put inside the frame. When you need to clear the root, call `frame.destroy()`. This will destroy `frame` and all its children. You will need to recreate the frame, but not the root. 2014-03-24 17:30 GMT-03:00 <eneskristo@gmail.com>: > I have this program, and since I want to change stuff dynamically, I want > to fully clear the root = Tk(), without deleting it. Is there a way to do > so? > -- > https://mail.python.org/mailman/listinfo/python-list >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web