Загрузка данных


import tkinter as tk

root = tk.Tk()
root.title("Full Screen Scalable Layout")
root.geometry("600x400")

# Чтобы верхняя и нижняя части делили экран пополам, 
# упакуем их в два больших контейнера (Frame)

# 1. ВЕРХНЯЯ ОБЛАСТЬ (Полосы)
top_container = tk.Frame(root)
top_container.pack(side='top', fill='both', expand=True)

tk.Label(top_container, text="Box 1", bg="red", fg="white").pack(fill='both', expand=True)
tk.Label(top_container, text="Box 2", bg="green", fg="white").pack(fill='both', expand=True)
tk.Label(top_container, text="Box 3", bg="blue", fg="white").pack(fill='both', expand=True)

# 2. НИЖНЯЯ ОБЛАСТЬ (Квадраты)
bottom_container = tk.Frame(root)
bottom_container.pack(side='bottom', fill='both', expand=True)

# side='left' заставляет их встать в ряд, 
# а fill='both' и expand=True заставляют жадно забирать всё место
tk.Label(bottom_container, text="Лефт", bg="lightblue").pack(side='left', fill='both', expand=True)
tk.Label(bottom_container, text="Центр", bg="pink").pack(side='left', fill='both', expand=True)
tk.Label(bottom_container, text="Райт", bg="yellow").pack(side='left', fill='both', expand=True)

root.mainloop()