…
f_top = LabelFrame(text="Верх")
f_bot = LabelFrame(text="Низ")
…
05 Jan, 11:52
…
f_top = LabelFrame(text="Верх")
f_bot = LabelFrame(text="Низ")
…
04 Jan, 11:52
from tkinter import *
root = Tk()
f_top = Frame(root)
f_bot = Frame(root)
l1 = Label(f_top, width=7, height=4, bg='yellow', text="1")
l2 = Label(f_top, width=7, height=4, bg='orange', text="2")
l3 = Label(f_bot, width=7, height=4, bg='lightgreen', text="3")
l4 = Label(f_bot, width=7, height=4, bg='lightblue', text="4")
f_top.pack()
f_bot.pack()
l1.pack(side=LEFT)
l2.pack(side=LEFT)
l3.pack(side=LEFT)
l4.pack(side=LEFT)
root.mainloop()
04 May, 09:00
04 May, 09:00
03 May, 20:35
08 Apr, 18:22
13 Mar, 09:25
13 Mar, 09:21
If you don't use any geometry manager for element of interface it don't show up in windowThere are three geometry managers:
11 Mar, 20:37
from PIL import ImageTk
master.image = ImageTk.PhotoImage(file='E:/pp/image2.jpg')
11 Mar, 20:30
from tkinter import *
class StartWindow:
def __init__(self, master):
master.geometry('1024x720') # window size
master.title("Window with background")
master.image = PhotoImage(file='E:/pp/water.png')
bg_label = Label(master, image=master.image)
bg_label.grid(row=0, column=0)
root = Tk()
my_gui = StartWindow(root)
root.mainloop()