Creating this layout using the pack manager is possible, but it takes a number of extra frame widgets, and a lot of work to make things look good. If you use the grid manager instead, you only need one call per widget to get everything laid out properly. Using the grid manager is easy. Just create the widgets, and use the grid method to tell the manager in which row and column to place them. You don’t have to specify the size of the grid beforehand; the manager automatically determines that from the widgets in it.
Code #1:
Python3
# import tkinter module
from tkinterimport * from tkinter.ttkimport *
# creating main tkinter window/toplevel
from0from1 from2
from3
from4from1 from6from1 from8
from9from1 from6from1 tkinter3
tkinter4
tkinter5
tkinter6from1 tkinter8tkinter9from1 tkinter8import2from1 import4from1 import6import7
import8from1 *0tkinter9from1 tkinter8import2from1 import4from1 import6import7
from0
from1from1 from3
from4from1 from3
from7
from8from1 tkinter8tkinter9from1 *0tkinter.ttk4from1 import6import7
tkinter.ttk8from1 *0tkinter9from1 *0tkinter.ttk4from1 import6import7
import8
import9
*0
Output:
Code #2: Creating the layout which is shown above.
Python3
# import tkinter module
from tkinterimport * from tkinter.ttkimport *
# creating main tkinter window/toplevel
from0from1 from2
from3
from4from1 from6from1 # creating main tkinter window/toplevel9
from9from1 from6from1 from04
tkinter4
tkinter5
tkinter6from1 tkinter8tkinter9from1 tkinter8import2from1 import4from1 import6import7
import8from1 *0tkinter9from1 tkinter8import2from1 import4from1 import6import7
from0
from1from1 from3
from4from1 from3
from7
from8from1 tkinter8tkinter9from1 *0tkinter.ttk4from1 import6import7
tkinter.ttk8from1 *0tkinter9from1 *0tkinter.ttk4from1 import6import7
from59
from60from1 from62from1 from64
from65from1 import6tkinter9from1 tkinter8import2from1 from73from1 import6import7
from77
from78from1 from80from81 from1 from83
from84from1 from86import6from88import6import7
from91
from92from1 from94from1 tkinter8tkinter9from1 import6from88
tkinter01tkinter02from1 import6tkinter05from1 import6tkinter08from1 tkinter10tkinter.ttk4from1 tkinter10import7