1,105,402 Community Members

tkinter transparent window

Member Avatar
ryufire
Newbie Poster
4 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

How do I make a transparent window in Tkinter?

Member Avatar
pyTony
pyMod
6,103 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
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

Member Avatar
Dan08
Junior Poster
138 posts since Jul 2009
Reputation Points: 8 [?]
Q&As Helped to Solve: 9 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
vegaseat
DaniWeb's Hypocrite
6,984 posts since Oct 2004
Reputation Points: 1,544 [?]
Q&As Helped to Solve: 1,872 [?]
Skill Endorsements: 67 [?]
Moderator
 
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

Member Avatar
vegaseat
DaniWeb's Hypocrite
6,984 posts since Oct 2004
Reputation Points: 1,544 [?]
Q&As Helped to Solve: 1,872 [?]
Skill Endorsements: 67 [?]
Moderator
 
0
 

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()
Question Answered as of 3 Years Ago by vegaseat, Dan08 and pyTony
Member Avatar
cgsig
Newbie Poster
1 post since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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?

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: