Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def stud_academics(window):
- window.destroy()
- #def stud_academics() -> None:
- customtkinter.set_appearance_mode("dark")
- customtkinter.set_default_color_theme("dark-blue")
- # Creating text variable for subject, examination
- global sub_var
- global examintaion
- # Creating academics window
- saw = customtkinter.CTk()
- saw.geometry("1280x585")
- saw.resizable(0,0)
- sub_var = StringVar()
- examination_var = StringVar()
- saw.title("STUDENT ACADEMICS")
- saw.iconbitmap("./ico/stud_academics.ico")
- # Creating background image variable
- bg = ImageTk.PhotoImage(Image.open("./icons/academics.jpg").resize((1280, 720), Image.Resampling.LANCZOS))
- # Creating background image label
- l1 = customtkinter.CTkLabel(master=saw, image=bg, bg_color="black")
- l1.place(x=0, y=0)
- # Creating the subject text label
- l2 = customtkinter.CTkLabel(master=saw, text="SUBJECT", text_font=("Consolas", 20, "bold"))
- l2.place(x=1070, y=40)
- # Getting student stream from database
- stream = L[6]
- # Creating combobox
- cb1 = customtkinter.CTkComboBox(master=saw)
- if stream == "computer science":
- cb1["values"] = ["Computer Science", "Maths", "Chemistry", "Physics, English"]
- elif stream == "bio maths":
- cb1["values"] = ["Biology", "Maths", "Chemistry", "Physics", "English"]
- elif stream == "bio psychology":
- cb1["values"] = ["Biology", "Psychology", "Chemistry", "Physics", "English"]
- elif stream == "commerce computer":
- cb1["values"] = ["Commerce", "Bussiness", "Economics", "Accountancy", "Computer Science"]
- elif stream == "commerce ip":
- cb1["values"] = ["Commerce", "Bussiness", "Economics", "Accountancy", "IP"]
- elif stream == "commerce maths":
- cb1["values"] = ["Commerce", "Bussiness", "Economics", "Accountancy", "Maths"]
- cb1.place(x=1070, y=60)
- saw.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement