Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- from math import sqrt
- class Page01(tk.Frame):
- def __init__(self, parent, AppSettings):
- self.settings = AppSettings
- super().__init__(parent)
- self.configure(bg="white")
- self.pack(fill="both", expand=True)
- #CREATE FRAMES
- self.create_frame01()
- self.create_frame02()
- self.create_frame03()
- def create_frame01(self):
- self.frame01 = tk.Frame(self, bg="black", height=self.settings.height//3)
- self.frame01.pack(fill="x")
- def create_frame02(self):
- self.frame02 = tk.Frame(self, bg="orange")
- self.frame02.pack(fill="both", expand=True)
- def create_frame03(self):
- frame03 = tk.Frame(self.frame02, bg="grey", height=(2*self.settings.height//3), width=(3*self.settings.width//4))
- frame03.pack(side="left", fill="y")
- line01 = tk.Frame(frame03, bg="white", height=(2*self.settings.height//9), width=(3*self.settings.width//4))
- line01.pack(fill='x')
- button7 = tk.Button(line01, text="7", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button7.pack(fill="x", expand=True, side="left")
- button8 = tk.Button(line01, text="8", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button8.pack(fill="x", expand=True, side="left")
- button9 = tk.Button(line01, text="9", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button9.pack(fill="x", expand=True, side="left")
- line02 = tk.Frame(frame03, bg="pink", height=(2*self.settings.height//9), width=(3*self.settings.width//4))
- line02.pack(fill='x')
- button4 = tk.Button(line02, text="4", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button4.pack(fill="x", expand=True, side="left")
- button5 = tk.Button(line02, text="5", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button5.pack(fill="x", expand=True, side="left")
- button6 = tk.Button(line02, text="6", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button6.pack(fill="x", expand=True, side="left")
- line03 = tk.Frame(frame03, bg="white", height=(2*self.settings.height//9), width=(3*self.settings.width//4))
- line03.pack(fill='x')
- button1 = tk.Button(line03, text="7", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button1.pack(fill="x", expand=True, side="left")
- button2 = tk.Button(line03, text="8", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button2.pack(fill="x", expand=True, side="left")
- button3 = tk.Button(line03, text="9", font=("Comic Sans Ms", int(sqrt(2)*self.settings.height//18), "bold"))
- button3.pack(fill="x", expand=True, side="left")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement