I'm using Tkinter for a gui experiment and I'm having some difficulties to pass my frame with some labels to full screen, do you have any ideas how can I do it?
#window
root = Tk()
root.title("Sequencia")
#root.attributes('-fullscreen', True)
#root.bind('<Escape>',lambda e: root.destroy())
#root.state('zoomed')
#root.configure(background='black')
fm = Frame(root, width=500, height=350, bg="black")
# w = Canvas(fm, width=20, height=20, bg ="black", selectborderwidth=0)
#w.create_line(0, 200, 150, 150, width=10, fill="blue")
label_sim = Label(fm, width=10, height=1, bg="gray", text = "SIM")
label_nao = Label(fm, width=10, height=1, bg="gray", text = "NÃO")
label_fome = Label(fm, width=10, height=1, bg="gray", text = "FOME")
label_sede = Label(fm, width=10, height=1, bg="gray", text = "SEDE")
label_urinar = Label(fm, width=10, height=1, bg="gray", text = "URINAR")
label_ar = Label(fm, width=10, height=1, bg="gray", text = "AR")
label_posicao = Label(fm, width=10, height=1, bg="gray", text = "POSIÇÃO")
labels = [label_sim,label_nao,label_fome,label_sede,label_urinar,label_ar,label_posicao]
# ordem de sequencia (1 2 3 4 5 6 7): (SIM, NAO, FOME, SEDE, URINAR, AR, POSICAO)
fm.pack()
label_sim.place(relx=0.2, rely=0.5, anchor=CENTER)
label_nao.place(relx=0.8, rely=0.5, anchor=CENTER)
label_fome.place(relx=0.35, rely=0.8, anchor=CENTER)
label_sede.place(relx=0.65, rely=0.8, anchor=CENTER)
label_urinar.place(relx=0.25, rely=0.25, anchor=CENTER)
label_ar.place(relx=0.5, rely=0.1, anchor=CENTER)
label_posicao.place(relx=0.75, rely=0.25, anchor=CENTER)
root.update()
thank you very much EDIT: what I'm trying is make the frame that I have fullscreen automatically, or is it only possible with the window? do we have to choose the size of the frame manually?
EDIT2: I manage to do it by taking the size of the window and put in the arguments of the frame:
#window
root = Tk()
root.title("Sequencia")
root.attributes('-fullscreen', True)
root.bind('<Escape>',lambda e: root.destroy())
#root.state('zoomed')
#root.configure(background='black')
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
fm = Frame(root, width=w, height=h, bg="black")