Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
5001CEM/designSpecTest.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
119 lines (76 sloc)
2.8 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
from PIL import ImageTk, Image | |
def open_roadster_page(): | |
#Test page | |
roadster_page = Toplevel() | |
roadster_page.title("Design Specifications - Tenabang Kuda-GT") | |
roadster_page.geometry("1280x720") | |
#Image | |
roadster_img = ImageTk.PhotoImage(Image.open("830685.jpg")) | |
#Labels | |
roadster_title = Label(roadster_page, text="Roadsters", font="Verdana 24 bold", fg="Blue") | |
kuda_gt_title = Label(roadster_page, text="Tenabang Kuda-GT", font="Verdana 20", fg="Black") | |
roadster_label = Label(roadster_page, image=roadster_img) | |
#Buttons | |
#Grid Arrangement | |
roadster_title.grid(row=0, column=0) | |
kuda_gt_title.grid(row=1, column=0) | |
roadster_label.grid(row=2, column=0) | |
#Loop | |
roadster_page.mainloop() | |
def open_suv_page(): | |
#Test page | |
suv_page = Toplevel() | |
suv_page.title("Design Specifications - Tenabang Gurami 3.0") | |
suv_page.geometry("1280x720") | |
#Image | |
suv_img = ImageTk.PhotoImage(Image.open("suv.jpg")) | |
#Labels | |
suv_title = Label(suv_page, text="SUVs", font="Verdana 24 bold", fg="Orange") | |
gurami_title = Label(suv_page, text="Tenabang Gurami 3.0", font="Verdana 20", fg="Black") | |
suv_label = Label(suv_page, image=suv_img) | |
#Buttons | |
#Grid Arrangement | |
suv_title.grid(row=0, column=0) | |
gurami_title.grid(row=1, column=0) | |
suv_label.grid(row=2, column=0) | |
#Loop | |
suv_page.mainloop() | |
def open_hatchback_page(): | |
#Test page | |
hatchback_page = Toplevel() | |
hatchback_page.title("Design Specifications - Tenabang Kumbang") | |
hatchback_page.geometry("1280x720") | |
#Image | |
hatchback_img = ImageTk.PhotoImage(Image.open("hatchback.webp")) | |
#Labels | |
hatchback_title = Label(hatchback_page, text="Hatchbacks", font="Verdana 24 bold", fg="Green") | |
kumbang_title = Label(hatchback_page, text="Tenabang Kumbang", font="Verdana 20", fg="Black") | |
hatchback_label = Label(hatchback_page, image=hatchback_img) | |
#Buttons | |
#Grid Arrangement | |
hatchback_title.grid(row=0, column=0) | |
kumbang_title.grid(row=1, column=0) | |
hatchback_label.grid(row=2, column=0) | |
#Loop | |
hatchback_page.mainloop() | |
def open_sedan_page(): | |
#Test page | |
sedan_page = Toplevel() | |
sedan_page.title("Design Specifications - Tenabang Moa 2.0") | |
sedan_page.geometry("1280x720") | |
#Image | |
ogsedan_img = Image.open("sedan.jpg") | |
sedan_img= ogsedan_img.resize((850,422), Image.ANTIALIAS) | |
true_sedan_img = ImageTk.PhotoImage(sedan_img) | |
#Labels | |
sedan_title = Label(sedan_page, text="Sedans", font="Verdana 24 bold", fg="Purple") | |
moa_title = Label(sedan_page, text="Tenabang Moa 2.0 ", font= "Verdana 20", fg="Black") | |
sedan_label = Label(sedan_page, image=true_sedan_img) | |
#Buttons | |
#Grid Arrangement | |
sedan_title.grid(row=0, column=0) | |
moa_title.grid(row=1, column=0) | |
sedan_label.grid(row=2, column=0) | |
#Loop | |
sedan_page.mainloop() |