【发布时间】:2012-12-25 09:42:43
【问题描述】:
python 2.7.3 中的此代码在 windows xp 中有效,在 Ubuntu Unity 中无效。 如何在 ubuntu 中使窗口透明。
# -*- coding: UTF-8 -*-
from Tkinter import Tk
window = Tk()
window.wm_attributes('-alpha',0.8)
window.geometry('500x500+200+211')
window.mainloop()
【问题讨论】:
-
你的代码在我的 ubuntu 上运行,带有 gnome-shell。
-
感谢您的回答和测试。
-
但在 Ubuntu Unity 中不起作用
-
ubuntu 中的透明度,例如 dropbox.com/s/d57md9c0djql0u3/terminal-ubuntu.png,但在 python tk 透明窗口中不起作用
-
@wd5: the tk docs 说它只能在 Windows 上运行。