- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to display full-screen mode on Tkinter?
Tkinter displays the application window by its default size. However, we can display a full-screen window by using attributes('fullscreen', True) method. The method is generally used for assigning a tkinter window with properties like transparentcolor, alpha, disabled, fullscreen, toolwindow, and topmost.
#Import the tkinter library from tkinter import * #Create an instance of tkinter frame win = Tk() #Set the geometry win.geometry("650x250") #Add a text label and add the font property to it label= Label(win, text= "Hello World!", font=('Times New Roman bold',20)) label.pack(padx=10, pady=10) #Create a fullscreen window win.attributes('-fullscreen', True) win.mainloop()
Running the above code will display a full-screen window that can be closed by pressing the Alt+ F4 key.
- Related Articles
- How to Handle CSS in Browser Full-Screen Mode?
- Creating Tkinter full-screen application
- How to center a window on the screen in Tkinter?
- How to get full screen activity in android?
- How to make full screen custom dialog in Android?
- How to display a tkinter application in fullscreen on macOS?
- How to create a full screen video background with CSS?
- How to add Full-Screen Background Video using Tailwind CSS?
- How to create a Splash Screen using Tkinter?
- How to create a simple screen using Tkinter?
- How to get the screen size in Tkinter?
- How to set dialog to show with full screen in Android?
- Difference between Widescreen and Full Screen