in reply to Tk tearoff toplevel IDs

cadphile,

Yes, the tearoff item is child of the mainwindow and will be destroyed when you kill its parent. I don't know of any way of getting its handle so you can destroy it in the program, but I have to ask: Why do you want to? Isn't the user the one 'tearing-off' the menu? Therefore shouldn't they be the one to destroy it?


Pat

Replies are listed 'Best First'.
Re: Re: Tk tearoff toplevel IDs
by cadphile (Beadle) on Jun 08, 2002 at 03:26 UTC
    The reason I want to destroy it in the program is that the menu that it's holding is repeatedly updated with new items, or with different items, and there are times when it must be completed cleared of all items. When it's been torn off, then after all the menu items are deleted, you just have this tiny little window with the Title Banner shrunk down to minimum size. It all pops back up when new items are added to the menu, but in the mean time, it looks ugly -- kind of like a shrivelled up old balloon.