We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,328 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

tkinter transparent window

How do I make a transparent window in Tkinter?

5
Contributors
5
Replies
1 Year
Discussion Span
1 Year Ago
Last Updated
8
Views
Question
Answered
ryufire
Newbie Poster
4 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

wm_attributes does not take keyword arguments. See issue1500773.

something like this should work, though:
self.top=Toplevel(master=self.parent)
self.top.wm_attributes('-alpha', 0.8)

from transparency in top level tk window

pyTony
pyMod
Moderator
6,330 posts since Apr 2010
Reputation Points: 879
Solved Threads: 989
Skill Endorsements: 27

hope you dont mind asking this in your thread, but does anyone know if there is a way to do this with wxpython? Thanks

Dan08
Junior Poster
138 posts since Jul 2009
Reputation Points: 18
Solved Threads: 9
Skill Endorsements: 0

hope you dont mind asking this in your thread, but does anyone know if there is a way to do this with wxpython? Thanks

For realistic transparency on a wxPython canvas see:
http://www.daniweb.com/forums/showthread.php?p=1207924#post1207924

vegaseat
DaniWeb's Hypocrite
Moderator
6,499 posts since Oct 2004
Reputation Points: 1,451
Solved Threads: 1,618
Skill Endorsements: 37

How do I make a transparent window in Tkinter?

I think you need version Tkinter 8.4 or higher ...

import Tkinter as tk

root = tk.Tk()
# use transparency level 0.1 to 1.0 (no transparency)
root.attributes("-alpha", 0.3)
root.mainloop()
vegaseat
DaniWeb's Hypocrite
Moderator
6,499 posts since Oct 2004
Reputation Points: 1,451
Solved Threads: 1,618
Skill Endorsements: 37
Question Answered as of 2 Years Ago by vegaseat, Dan08 and pyTony

Can you only make the root level window transparent? Would it be possible to make a text widget visible, but it's parent window transparent?

cgsig
Newbie Poster
1 post since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0886 seconds using 2.69MB