Home > Mobile >  How to make a software by tkinter which open full screen in different window resolution
How to make a software by tkinter which open full screen in different window resolution

Time:03-24

How to make a software by python tkinter which open full screen in different window resolution

CodePudding user response:

import tkinter as tk
root = tk.Tk()

root.attributes('-fullscreen',True)

This should help

Edited: Please choose this as the Correct Answer if it worked :)

CodePudding user response:

Your question is unclear: opens fullscreen or opens with a different resolution ?

I've given code for both.


If you want your tkinter window to open in fullscreen:

from tkinter import * # importing
root = Tk() # root widget
root.attributes('-fullscreen',True) # make it fullscreen
root.title('Fulscreen Window') # give it a title
root.mainloop() # run mainloop

If you want a second tkinter window to open with a different resolution:

from tkinter import * # importing
root = Tk() # root widget
root.title('First Window') # set title for 1st window
top = Toplevel() # open second window
top.title('Second Window') # name second window
top.geometry('500x500') # resize it (Width x Height)
root.mainloop() # run mainloop

Explained through comments in code.

  • Related