-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainInterface.py
More file actions
40 lines (32 loc) · 1.21 KB
/
MainInterface.py
File metadata and controls
40 lines (32 loc) · 1.21 KB
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
import tkinter as tk
from HomePageFrame import HomePageFrame
class Interface(tk.Tk):
"""
A class for CodeVenture's main interface.
Attributes:
title (str): The title of the application window.
width (int): The width of the application window.
height (int): The height of the application window.
homepage: An instance of the HomePageFrame.
Methods:
__init__(self, title, width=800, height=650): Constructor for the Interface class.
"""
def __init__(self, title, width=800, height=650):
"""
Constructor for the Interface class.
Args:
title (str): The title of the application window.
width (int): The width of the application window.
height (int): The height of the application window.
"""
super().__init__()
self.title(title)
self.configure(bg="light green")
self.geometry(f"{width}x{height}")
self.homepage = HomePageFrame(self)
self.homepage.place(relx=0.5, rely=0.5, anchor=tk.CENTER)
if __name__ == "__main__":
# DO NOT MODIFY THIS
codeventure = Interface("CodeVenture")
codeventure.mainloop()
print("--- End of program execution ---")