MCPcopy Create free account
hub / github.com/cztomczak/cefpython / __init__

Method __init__

examples/tkinter_.py:71–106  ·  view source on GitHub ↗
(self, root)

Source from the content-addressed store, hash-verified

69class MainFrame(tk.Frame):
70
71 def __init__(self, root):
72 self.browser_frame = None
73 self.navigation_bar = None
74 self.root = root
75
76 # Root
77 root.geometry("900x640")
78 tk.Grid.rowconfigure(root, 0, weight=1)
79 tk.Grid.columnconfigure(root, 0, weight=1)
80
81 # MainFrame
82 tk.Frame.__init__(self, root)
83 self.master.title("Tkinter example")
84 self.master.protocol("WM_DELETE_WINDOW", self.on_close)
85 self.master.bind("<Configure>", self.on_root_configure)
86 self.setup_icon()
87 self.bind("<Configure>", self.on_configure)
88 self.bind("<FocusIn>", self.on_focus_in)
89 self.bind("<FocusOut>", self.on_focus_out)
90
91 # NavigationBar
92 self.navigation_bar = NavigationBar(self)
93 self.navigation_bar.grid(row=0, column=0,
94 sticky=(tk.N + tk.S + tk.E + tk.W))
95 tk.Grid.rowconfigure(self, 0, weight=0)
96 tk.Grid.columnconfigure(self, 0, weight=0)
97
98 # BrowserFrame
99 self.browser_frame = BrowserFrame(self, self.navigation_bar)
100 self.browser_frame.grid(row=1, column=0,
101 sticky=(tk.N + tk.S + tk.E + tk.W))
102 tk.Grid.rowconfigure(self, 1, weight=1)
103 tk.Grid.columnconfigure(self, 0, weight=1)
104
105 # Pack MainFrame
106 self.pack(fill=tk.BOTH, expand=tk.YES)
107
108 def on_root_configure(self, _):
109 logger.debug("MainFrame.on_root_configure")

Callers

nothing calls this directly

Calls 4

setup_iconMethod · 0.95
BrowserFrameClass · 0.85
NavigationBarClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected