Is it possible to create a Tkinter Window with no frame, and no background?
Asked Answered
R

1

2

I've looked through the documentation, and searched quite a bit now, and couldn't find an answer for this problem. Before I give up, I'll ask here.

I want to create a window that has no frame (as in, no titlebar, no border around the window), and maybe a transparent background. I've found how to set the background to a certain colour, but not to transparent, and couldn't find anything about whether I can have the frame not display itself.

So I ask, is it possible to create a Tkinter window that has no border, and a transparent background?

Rosalbarosalee answered 19/3, 2011 at 16:56 Comment(0)
M
2

No border is possible. Try something like wm transient or wm overrideredirect.

Transparent depends, have a look at the documentation for wm attributes: http://www.tcl.tk/man/tcl/TkCmd/wm.htm#M8 On windows you can set a transparentcolor.

Otherwise you might need a platform specific extension to create oddly shaped and transparent windows, for example: http://www.cs.man.ac.uk/~fellowsd/tcl/shapeidx.html

Mulligatawny answered 19/3, 2011 at 17:15 Comment(3)
Do you have any suggestions for an extension that can create transparent windows apart from the above mentioned 'shape'? It'll be especially nice to control the borders as well.Rosalbarosalee
Maybe this helps, nothing readily downloadable comes to my mind there: wiki.tcl.tk/13409 ah, the shape extension can be had from: cs.man.ac.uk/~fellowsd/tcl/shapeidx.htmlMulligatawny
This should work, only it's way out of my depth. The extension seems to be accessed via C, and I've barely learnt anything about C so far. Certainly, I've not learnt how to use C extensions with Tkinter. I mostly work in Python. Sorry for using up your time.Rosalbarosalee

© 2022 - 2024 — McMap. All rights reserved.