-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay_courses.py
54 lines (47 loc) · 2.52 KB
/
display_courses.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
47
48
49
50
51
52
53
54
from tkinter import *
from functionsPackage.courses import cse, ece, eee, mech, civil
def display_courses():
courses_window = Tk()
courses_window.title(' Courses Available ')
Label(courses_window, text=" ** Courses Available ** ", fg='indigo', font=("Wide Latin", 27),
bg="grey").pack()
courses_window.geometry("700x500")
option = IntVar()
def display_specialized_courses():
if option.get() == 1:
courses_window.destroy()
cse.display()
elif option.get() == 2:
courses_window.destroy()
ece.display()
elif option.get() == 3:
courses_window.destroy()
eee.display()
elif option.get() == 4:
courses_window.destroy()
mech.display()
elif option.get() == 5:
courses_window.destroy()
civil.display()
R1_button = Radiobutton(courses_window, text="IT/CSE/CS/CST courses", variable=option, value=1,
font=('Arial Rounded MT Bold', 12), foreground="red", background="light green",
command=display_specialized_courses)
R1_button.pack(anchor=CENTER, pady=4)
R2_button = Radiobutton(courses_window, text="ECE courses", variable=option, value=2,
font=('Arial Rounded MT Bold', 12), foreground="indigo", background="light green",
command=display_specialized_courses)
R2_button.pack(anchor=CENTER, pady=4)
R3_button = Radiobutton(courses_window, text="EEE courses", variable=option, value=3,
font=('Arial Rounded MT Bold', 12), foreground="black", background="light green",
command=display_specialized_courses)
R3_button.pack(anchor=CENTER, pady=4)
R4_button = Radiobutton(courses_window, text="Mechanical Engineering courses", variable=option, value=4,
font=('Arial Rounded MT Bold', 12), foreground="blue", background="light green",
command=display_specialized_courses)
R4_button.pack(anchor=CENTER, pady=4)
R5_button = Radiobutton(courses_window, text="Civil Engineering courses", variable=option, value=5,
font=('Arial Rounded MT Bold', 12), foreground="purple", background="light green",
command=display_specialized_courses)
R5_button.pack(anchor=CENTER, pady=4)
# btn = Button(courses_window, text='back', command=welcomewindow).pack()
courses_window.mainloop()