Re: TKinter -- '<Destroy>' event executing more than once?



jepler@xxxxxxxxxxxxxx wrote:

Bindings created on a Toplevel or Tk widget apply to *all* widgets in
the same toplevel. So you're seeing a <Destroy> event for each widget
you create...

Oh. :) Is there a way of binding the event just to the window itself, or should I just check that the widget referenced in the 'event'? [update: not even sure how I'd do this anyway, since the widget returned in the event "is not" the root widget] .



Relevant Pages

  • Re: ttk::checkbutton - I think, its a bug
    ... suggesting using <Destroy> for releasing the data associated with the ... binding on the widget (in order to destroy the data. ... Setting the binding is one way, ... It's quite convenient to have the model updated as the user fiddles with the view. ...
    (comp.lang.tcl)
  • Re: ttk::checkbutton - I think, its a bug
    ... knowledge about MVC and similar designs, but it's clear too that you ... suggesting using <Destroy> for releasing the data associated with the ... binding on the widget (in order to destroy the data. ... On a MVC design, there are mechanisms for transfering the data from the ...
    (comp.lang.tcl)
  • Re: Q: dynamic movement between toplevels, notebooks, panes
    ... | arbitrarily large amounts of input data. ... Add the time to repopulate a new widget, ... long to destroy and recreate the text on current machines (8MB text ...
    (comp.lang.tcl)
  • Re: Q: dynamic movement between toplevels, notebooks, panes
    ... large amounts of input data. ... it takes several seconds to destroy a text widget. ... create a new peer and then destroy the old and not have any of the ...
    (comp.lang.tcl)
  • Re: Ruby/Tk
    ... # A peer widget of 'txt' widget. ... withdraw the toplevel widget instead of destroy it. ... destroy the toplevel ... ...
    (comp.lang.ruby)