MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / __init__

Method __init__

projects/Tkinter/1.py:9–35  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

7class tkinterApp(tk.Tk):
8 # __init__ function for class tkinterApp
9 def __init__(self, *args, **kwargs):
10 # __init__ function for class Tk
11 tk.Tk.__init__(self, *args, **kwargs)
12
13 # creating a container
14 container = tk.Frame(self)
15 container.pack(side="top", fill="both", expand=True)
16
17 container.grid_rowconfigure(0, weight=1)
18 container.grid_columnconfigure(0, weight=1)
19
20 # initializing frames to an empty array
21 self.frames = {}
22
23 # iterating through a tuple consisting
24 # of the different page layouts
25 for F in (std_ca, LandPage, accnt, lgin):
26 frame = F(container, self)
27
28 # initializing frame of that object from
29 # startpage, page1, page2, page3 respectively with
30 # for loop
31 self.frames[F] = frame
32
33 frame.grid(row=0, column=0, sticky="nsew")
34
35 self.show_frame(std_ca)
36
37 # to display the current frame passed as
38 # parameter

Callers

nothing calls this directly

Calls 2

show_frameMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected