31 lines
687 B
Python
31 lines
687 B
Python
from controller.MainController import MainController
|
|
import tkinter as tk
|
|
|
|
class MainWindow(tk.Tk):
|
|
"""
|
|
View - MainWindow
|
|
|
|
dec...
|
|
"""
|
|
# Variables
|
|
controller: MainController
|
|
|
|
# Constructor
|
|
def __init__(self, controller: MainController):
|
|
super().__init__()
|
|
|
|
# Init main window
|
|
self.title('Tkinter MVC Demo')
|
|
|
|
# Save and setup main controller
|
|
self.controller = controller
|
|
controller.set_view(self)
|
|
|
|
def set_view(self, view):
|
|
self.view = view
|
|
self.view.grid(row=0, column=0, padx=10, pady=10)
|
|
|
|
# Section Interface
|
|
def show_frame(self, frame):
|
|
pass
|
|
# End Section Interface |