Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- THEME_COLOR = "#375362"
- class QuizInterface:
- def __init__(self):
- ## window setup
- self.window = Tk()
- self.window.title("Quizzler")
- self.window.configure(padx=20, pady=20, background=THEME_COLOR)
- ## score label
- self.label = Label(text="Score:0", fg="white", bg=THEME_COLOR)
- self.label.grid(column=1, row=0)
- ## Flash Card(canvas)
- self.canvas = Canvas(self.window, width=300, height=250, bg="white")
- self.canvas.grid(column=0, row=1, columnspan=2, pady=50)
- self.Question = self.canvas.create_text(150, 125, font=("Ariel", 14, 'italic'), text="大家好")
- ## buttom
- self.right = PhotoImage(file="images/true.png")
- self.wrong = PhotoImage(file="images/false.png")
- #### Image
- self.right_buttom = Button(image=self.right, highlightthickness=0)
- self.right_buttom.grid(column=0, row=2)
- self.wright_buttom = Button(image=self.wrong, highlightthickness=0)
- self.wright_buttom.grid(column=1, row=2)
- self.window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement