How to start full screen window with Tkinter?

Asked

Viewed 2,049 times

1

from caixaimport import *

# Variables



# Tkinter Variables

win_width, win_height = 1280, 1024

windows = Tk() # start a variable Tk
windows.geometry(f'{win_width}x{win_height}')
windows.title('SCH payment system') # putting a title in variable window




# Method



# Program

windows.mainloop() # Start the variable "window" with the function mainloop

3 answers

4


Try to do so:

windows.attributes('-fullscreen',True)

PS: I used this solution to solve this problem; when I searched, I searched in English and found the following thread Python 3.3 Tkinter Fullscreen

  • Can you put some documentation or explanation? And at what point should he do it?

  • I added the link I used as a reference at the time of my solution.

  • Already helped, thanks and thanks

-1

from tkinter import *
        
janela = Tk()
janela.configure(bg='light blue1')
janela.title('tela cheia')
janela.overrideredirect(True)
janela.geometry("{0}x{1}+0+0".format(janela.winfo_screenwidth(), janela.winfo_screenheight()))

def sair():
    janela.destroy()

def maxmize():
    janela.geometry("{0}x{1}+0+0".format(janela.winfo_screenwidth(), janela.winfo_screenheight()))
    janela.overrideredirect(True)

def abas():
    janela.overrideredirect(False)

bt = Button(width=20, bg='red',font='roboto',text='fechar janela',command=sair)
bt.place(x=0,y=0)

bt = Button(width=20, bg='light blue',font='roboto',text='mostrar como tela cheia',command=maxmize)
bt.place(x=190,y=0)

bt = Button(width=20, bg='light blue',font='roboto',text='mostrar como janela',command=abas)
bt.place(x=380,y=0)

-1

Usable:

windows.state('zoomed')

Browser other questions tagged

You are not signed in. Login or sign up in order to post.