33 lines
725 B
Python
33 lines
725 B
Python
|
import tkinter as tk
|
||
|
import tkinter.ttk as ttk
|
||
|
|
||
|
class Controller(object):
|
||
|
def __init__(self, app):
|
||
|
self.app = app
|
||
|
|
||
|
def run_process(self):
|
||
|
print("Run")
|
||
|
return 0
|
||
|
|
||
|
class Application(tk.Tk):
|
||
|
def __init__(self):
|
||
|
super().__init__()
|
||
|
self.con = Controller(self)
|
||
|
self.create_control_variables()
|
||
|
self.create_widgets()
|
||
|
|
||
|
def create_control_variables(self):
|
||
|
pass
|
||
|
|
||
|
def create_widgets(self):
|
||
|
self.b = ttk.Button(master=self, text="Start", command=self.con.run_process)
|
||
|
self.b.grid(row=1, column=0)
|
||
|
|
||
|
|
||
|
# --------------------------
|
||
|
# Execution
|
||
|
# --------------------------
|
||
|
if __name__ == "__main__":
|
||
|
app = Application()
|
||
|
app.mainloop()
|