- 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
Creating a Transparent window in Python Tkinter
Python is the most popular language for developing and creating functional and desktop applications. It has a rich library of different modules and functions which provides extensibility and accessibility to create and develop applications.
Tkinter is the most commonly used library for creating GUI-based applications. It has features like adding widgets and other necessary attributes.
Let us suppose that we want to create a transparent window using tkinter. To create the transparent window, we can use the attributes property and define the opacity value.
Example
#Importing the tkinter library from tkinter import * #Create an instance of tkinter frame win= Tk() #Define the size of the window or frame win.geometry("700x400") #To Make it transparent use alpha property to define the opacity of the frame win.attributes('-alpha', 0.3) win.mainloop()
Output
Running the above code will generate the output and will show a transparent window.
Advertisements
To Continue Learning Please Login
Login with Google