-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mainpage.py
47 lines (35 loc) · 2.29 KB
/
Mainpage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import tkinter as tk
class MainPage(tk.Frame):
"""
Dit is de main frame (begin scherm) die de gebruiker meteen ziet als het programma runt,
hier zijn er 3 buttons aangamaakt om vervolgens andere klasses(schermen) aan te roepen
"""
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent, bg='white')
self.controller = controller
# kleuren voor de background en fg
bg_background = "#81B29A"
fg = "#3D405B"
# 2 frames aangemaakt om de layout beter te kunnen organisieren
frameBovenMainpage = tk.Frame(self, bg=bg_background)
frameOnderMainpage = tk.Frame(self, bg=bg_background)
tk.Frame.configure(self, bg=bg_background)
titel = tk.Label(frameBovenMainpage, text="Welcome to Growth Curve Model!", fg='black', bg="white",font='Arial 35 bold')
startGrafiekTekenen = tk.Button(frameOnderMainpage, text="Teken de grafiek", height=5, width=23, fg=fg,
bg="white", font='Arial 14', command=lambda: controller.showFrame("PlotGraph"))
infoBact = tk.Button(frameOnderMainpage, text="Informatie over de bacterie ", height=5, width=23, fg=fg,
bg="white", font='Arial 14', command=lambda: controller.showFrame("InfoBact"))
exitButton = tk.Button(frameOnderMainpage, text="Exit the program ", height=5, width=23, fg=fg,
bg="white", font='Arial 14', command=frameBovenMainpage.quit)
procesFileButton = tk.Button(frameOnderMainpage, text="Upload a file", height=5, width=23, fg=fg,
bg="white", font='Arial 14', command=lambda: controller.showFrame("ProcesFile"))
statusbar = tk.Label(self, bd=1, relief=tk.SUNKEN, padx=10, pady=20, bg="white",text="Copyright© Maria Dukmak")
statusbar.pack(side=tk.BOTTOM, fill=tk.BOTH)
# hier wordt alles op het schrem aangetoond
titel.pack(side=tk.TOP, fill=tk.X)
startGrafiekTekenen.pack(side=tk.LEFT, fill=tk.X, padx=5)
infoBact.pack(side=tk.LEFT, fill=tk.X, padx=5)
procesFileButton.pack(side=tk.LEFT, fill=tk.X, padx=5)
exitButton.pack(side=tk.LEFT, fill=tk.X, padx=5)
frameBovenMainpage.pack(pady=0, expand=tk.TRUE)
frameOnderMainpage.pack(expand=tk.TRUE)