Issue in applying geometry grid to widgets in tkinter Notebook pages Issue in applying geometry grid to widgets in tkinter Notebook pages tkinter tkinter

Issue in applying geometry grid to widgets in tkinter Notebook pages


You can not use more than one geometry manager at the same time.

Well, I saw answers stating the same thing, but in reality you can if you do not misuse them. And this is your situation: you use more than one geometry manager but in a wrong way.

You have two options:

  • Option 1:

As fir note, you want to use the pack() geometry manager for tab1 widget. This means you have to remove away these 2 lines:

lb1.grid(row=1, column=1, sticky='E', padx=5, pady=5, ipadx=5, ipady=5)

and:

cm.grid(row=1, column=2, sticky='E', padx=5, pady=5, ipadx=5, ipady=5)
  • Option 2:

You want to use the pack() geometry manager for the note widget but you want to use grid() for tab1. You can do that safely and without confusing the Python interpreter by removing these 2 lines and keeping the former ones I mentioned above:

lb1.pack()

and:

cm.pack()


Try

lbl.pack(side=left)

and

cm.pack(side=left)

that should put both widgets to the left