- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- 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 create a borderless fullscreen application using Python-3 Tkinter?
In order to make a Tkinter window borderless and full-screen, we can use the utility method attributes(‘-fullscreen’, True). Tkinter windows can be configured using functions and methods defined in the Tkinter library.
Another similar method Tkinter provides to make the application window full-screen is, overrideredirect(True). This method can be invoked only if the application needs to resize in its defined width and height only.
Example
#Import the required Libraries from tkinter import * #Create an instance of Tkinter frame win= Tk() #Set the Geometry win.geometry("750x250") #Full Screen Window win.attributes('-fullscreen', True) def quit_win(): win.destroy() #Create a Quit Button button=Button(win,text="Quit", font=('Comic Sans', 13, 'bold'), command= quit_win) button.pack(pady=20) win.mainloop()
Output
Running the above code will display a full-screen window.
Click the "Quit" button to close the full-screen window.
Advertisements