Problems inserting two different classes within the same frame into a notebook using Tkinter and Python Problems inserting two different classes within the same frame into a notebook using Tkinter and Python tkinter tkinter

Problems inserting two different classes within the same frame into a notebook using Tkinter and Python


You are using app2 = Calculation (stepOne), and that means that you are placing different widgets with the same parent in the same grid positions. The outcome in this situation is that Tkinter does not display any widget at all.

But even if changing it with app2 = Calculation (stepTwo), you still have the same problem with this two lines of code:

self.Button = Button(text='Calculate',width=8,command=self.Calc)self.Button.grid(row=9,column=2,padx=2,pady=3)

You are not setting any parent, so it uses the default Tk element and the same problem that I mentioned before occurs, but this time with the root element.

Finally, I strongly recommend you to use only one import statement for each module, since Tkinter and ttk uses the same names for some classes and it is different if you used a themed widget or not.

import Tkinter as tkimport ttk import tkFontimport tkMessageBoximport sysimport math# ...