我目前正在与Tkinter和Python 2.7在Linux上,我想知道是否有一种方法来删除TK()
窗口边框和标题栏,而不使用overrideredirect(1)
。Python/Tkinter:删除标题栏没有overrideredirect()
我有自己的关闭按钮和overrideredirect(1)
给我看,我不能接受的几个问题:
- GUI始终是头等
- 无法图标然后deiconify正常
- 没有键盘上输入不能输入字段(请参见python tkinter overrideredirect; cannot receive keystrokes (Linux))
我不能使用attributes("-fullscreen", True)
作为标题栏并保留边框。
感谢您的答复,这是在Linux,Windows或两者都使用?我目前在Windows上使用Python 3.5和Tkinter 8.6,并且我得到这个错误: '_tkinter.TclError:wrong#args:should be“wm attributes window?-alpha?double ???-transparentcolor?color ??? -disabled?bool ?? -fullscreen?bool ???-toolwindow?bool ???-topmost?bool ??“'_ _ –
这真是太神奇了 - 只是在Linux上测试过它,它完美的工作! (到目前为止) –
'-type'选项仅与X相关,因为它是X Window管理器使用的系统。提示359有详细信息(http://www.tcl.tk/cgi-bin/tct/tip/359.html)。您可以检查'root.tk.call('tk','windowingsystem')'“x11”,并使用它来避免在其他系统上使用此功能。 – patthoyts