[Tutor] Changing menu "title" using Tkinter&In-Reply-To=41611636.2040601@ns.sympatico.ca

André Roberge andre.roberge at ns.sympatico.ca
Mon Oct 4 14:34:27 CEST 2004


====== Once again, Kent Johnson comes to the rescue :-)
Thanks Kent,
I was getting this error message and didn't catch on that I had to use the
tearoff=0 option, even after you pointed it out in your first message.

I'm wondering if it's something about the "clone" issue that I saw a
reference to last night.  From the little I understood, a "clone" is created
for cascading menus (tearable only?), with a "title" option that can be set
by the user when said menu is "torn" to be used as a stand-alone
"window".....

André Roberge

----- beginning of solution follows...
This is similar to the previous question, but you have to call entryconfig
on the top menu. Here is a revised makemenu(). Note the top menu now needs
to be set with tearoff=0. (I don't understand this - without tearoff=0 the
entryconfig() call gives the error
TclError: unknown option "-label")

def makemenu(self):
    top = Menu(self, tearoff=0)
    self.config(menu=top)... etc.




More information about the Tutor mailing list