Dynamically deleting widgets and redrawing a GUI

Rob Neely rneely at home.com
Wed Jun 27 02:07:26 EDT 2001


Hi,

I am developing a small Tkinter application where I have a frame that
contains one widget (button) for each file in a directory.  One of the
options is to be able to select some set of files (by selecting their
buttons) and delete them.  i.e. physically delete the files from the
disk.

At that point, I would like to "redraw" the frame with the buttons
representing the deleted objects no longer there.

Can anyone point me in the right direction on how to go about this? 
My closest attempt was a complete hack, and involved destroying the
frame and reinstantiating it (thus forcing it to generate it's widget
tree from scratch) - but I couldn't even get that to work too
smoothly...

If more info is needed, please let me know (I tend to ramble and lose
people, so I'm purposefully trying to keep this short and sweet. :-))

Thanks in advance.

--Rob



More information about the Python-list mailing list