Re: Tkinter menus made easy

2008-03-27 Thread bearophileHUGS
[EMAIL PROTECTED]: > Mine does less. But you tell it less to do it. Some of those fields are optional :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menus made easy

2008-03-27 Thread MartinRinehart
[EMAIL PROTECTED] wrote: > menudef = """ > File > New,callNew,Ctrl-N > New Window, callNewWindow, Ctrl-Shift-N > __ > Open, lambda e=0:para(1), Ctrl-O Nice design. I looked at it for a few seconds and didn't even think about pressing F1. Mine does

Re: Tkinter menus made easy

2008-03-27 Thread MartinRinehart
Guilherme Polo wrote: > there is a > gui designer tool for tkinter called GUI Designer (what a bad name), > which used to be called SpecTcl, where you can design the menus and it > then converts to python code. I tried it. after about 10 minutes I was as far as "help not found." Is anyone out t

Re: Tkinter menus made easy

2008-03-27 Thread bearophileHUGS
On Mar 27, 3:54 pm, [EMAIL PROTECTED] wrote: > Writing Tkinter menu code used to be rather tedious, uninspiring work. > I figured that I could delegate the job to a program: I did develop a proggy that takes the following as input, it's part of my "agui" project, you can use it as an idea to impro

Re: Tkinter menus made easy

2008-03-27 Thread Guilherme Polo
2008/3/27, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Writing Tkinter menu code used to be rather tedious, uninspiring work. > I figured that I could delegate the job to a program: > I didn't look at it yet, but just in case you weren't aware there is a gui designer tool for tkinter called GUI Desi

Tkinter menus made easy

2008-03-27 Thread MartinRinehart
Writing Tkinter menu code used to be rather tedious, uninspiring work. I figured that I could delegate the job to a program: http://www.martinrinehart.com/articles/menus.py Run it. Then look at the source (bottom of file). There's a bit more doc in the doc comment at the top. Peer review is most

Re: Tkinter menus from keyboard

2008-03-26 Thread MartinRinehart
Eric Brunel wrote: > BTW, this "standard" is not universal at all: e.g, there is no such > convention on Macs. Thanks for the info. It's standard on Windows and Linux/KDE. GNOME, anyone? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menus from keyboard

2008-03-26 Thread Eric Brunel
On Wed, 26 Mar 2008 13:45:29 +0100, Guilherme Polo <[EMAIL PROTECTED]> wrote: > 2008/3/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: >> Tkinter defaults to, for example, Alt+f = File (if File is your first >> menu name starting with "f"). >> >> I'd like to assign my own letters and have them unde

Re: Tkinter menus from keyboard

2008-03-26 Thread MartinRinehart
Guilherme Polo wrote: > Set the underline option to the index of the desired letter Elegant simplicity in the dropdowns. Thanks! Now, how about main menu underscores? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menus from keyboard

2008-03-26 Thread Guilherme Polo
2008/3/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Tkinter defaults to, for example, Alt+f = File (if File is your first > menu name starting with "f"). > > I'd like to assign my own letters and have them underscored, per the > universal standard. Can this be done? > Set the underline option t

Tkinter menus from keyboard

2008-03-26 Thread MartinRinehart
Tkinter defaults to, for example, Alt+f = File (if File is your first menu name starting with "f"). I'd like to assign my own letters and have them underscored, per the universal standard. Can this be done? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menus

2007-03-02 Thread Eric Brunel
On Fri, 02 Mar 2007 13:41:12 +0100, Gigs_ <[EMAIL PROTECTED]> wrote: > is it alright to use Menu instead Toplevel or Tk > like this? > > from Tkinter import * > from tkMessageBox import * > > class MenuDemo(Menu): > def __init__(self, master=None): > Menu.__init__(self, master) >

Re: Tkinter menus

2007-03-02 Thread Gigs_
>> master is a reference to a Tk() or Toplevel(). Frames do not contain >> menus, but the windows that contain them do. > > This is the main reason why I always rant about examples of Tkinter > programming creating windows by sub-classing Frame: frames are not > windows. If you want to create a

Re: Tkinter menus

2007-03-02 Thread Eric Brunel
On Thu, 01 Mar 2007 22:35:40 +0100, James Stroud <[EMAIL PROTECTED]> wrote: > Gigs_ wrote: >> class MenuDemo(Frame): >> def __init__(self, parent=None): >> Frame.__init__(self, parent) >> self.pack(expand=YES, fill=BOTH) >> self.createWidgets() >> def createWidget

Re: Tkinter menus

2007-03-01 Thread James Stroud
Gigs_ wrote: > class MenuDemo(Frame): > def __init__(self, parent=None): > Frame.__init__(self, parent) > self.pack(expand=YES, fill=BOTH) > self.createWidgets() > > def createWidgets(self): > self.makeMenuBar() > self.makeToolBar() > L = Lab

Tkinter menus

2007-03-01 Thread Gigs_
class MenuDemo(Frame): def __init__(self, parent=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) self.createWidgets() def createWidgets(self): self.makeMenuBar() self.makeToolBar() L = Label(self, text='Menu and T