Hey everyone,

I'm getting familiar with TkInter, and while it's a cool program, I'm having a hell of a time with keeping all the classes straight. As of now, I'm trying to build a program with a menubar and some other widgets. I can get the program working if I call it through the main program:

root = Tk()

meninst = Menu(root) #All properties of the menu are designed in this block
root.config(menu=meninst)
filemenu=Menu(meninst)
etc...

mainloop()

Now, that's all fine, but what I'd really prefer to do is have a class file, say "Menu style A.py", which I can simply pass root to, and then all the menus and things will appear. I've seen some documentation for this with the widgets; however, I'm not really sure how to do it with my root window. Any help would be great.

I should point out that in theory, this should work for all toplevel windows. So if I made a completely new window, I'd like to be able to import these class files to customize it so it looks exactly how I want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.