Advertisement
Jorell_Ramos_Sinaga

app004.py

Feb 23rd, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import tkinter as tk
  2.  
  3. base = 75
  4. w_ratio = 3
  5. h_ratio = 4
  6. width = w_ratio*base
  7. height = h_ratio*base
  8. screen = f"{width}x{height}+300+400"
  9.  
  10. window = tk.Tk()
  11. window.title("App004")
  12. window.geometry(screen)
  13.  
  14. frame01 = tk.Frame(bg="grey", height=height//4)
  15. frame01.pack(fill="both")
  16.  
  17. frame02 = tk.Frame(bg="orange", width=width//2)
  18. frame02.pack(fill="both", expand=True)
  19.  
  20. frame03 = tk.Frame(frame02, bg="blue", width=width//2, height=3*height//4)
  21. frame03.pack(side="right", fill="y")
  22.  
  23. frame04 = tk.Frame(frame03, bg="black", width=width//2, height=3*height//16)
  24. frame04.pack(side="bottom")
  25.  
  26. window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement