[Tkinter-discuss] Working with tear-off menus (change the "-----" label, customize location/appearance of tear-off window)
Michael Lange
klappnase at web.de
Mon Nov 22 17:50:48 CET 2010
Thus spoketh Jeff Epler <jepler at unpythonic.net>
unto us on Mon, 22 Nov 2010 07:26:41 -0600:
> You can manually create a tearoff from a menu:
> % .m clone .mt tearoff
> and post it at a desired location:
> % .mt post 100 100
> As suggested in the other message, you can use "wm resizeable" to make
> it not change size:
> % wm resiz .mt 0 0
> (Of course, I only tested this on linux, so on Windows YMMV)
>
> Unfortunately, the menu 'clone' subcommand does not seem to be wrapped
> in Python. You can add it, but it'll be gross and touches stuff that
> should be considered implementation details of Tkinter (works with
> all python2.x I'm aware of, though):
>
This is interesting, I never heard about that. And, from man menu I see
that menubars are also cloned, which might explain the troubles with the
menubars and cascading menus the OP had in the previous thread, I can
confirm the same problem with <<MenuSelect>> with the torn off popup menu,
while it works all right with the "normal" one.
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
We Klingons believe as you do -- the sick should die. Only the strong
should live.
-- Kras, "Friday's Child", stardate 3497.2
More information about the Tkinter-discuss
mailing list