更改此项:if dialogs: # if there are any dialogs left:
for widget in dialogs: # go through each widget
widget.lift(aboveThis=self.root) # and lift it above the root
为此:
^{pr2}$
小部件将停留在主窗口上方。在
编辑:
抱歉,只有一半的工作。。。寡妇们有时会带着密码呆在上面
:-X
在你关闭其中一个控件之前,它一直保持在顶部。。。。这段代码确实让小部件保持在最上面
当您生成窗口时,它使用self.attributes("-topmost", True)。在
再次抱歉。在from Tkinter import *
class PropertyDialog(Toplevel):
def __init__(self, root, string):
Toplevel.__init__(self)
self.wm_overrideredirect(1)
self.root = root
self.\
geometry('+%d+%d' %
(root.winfo_pointerx(),
root.winfo_pointery()))
try:
self.tk.call('::Tk::unsupported::MacWindowStyle',
'style', self._w,
'help', 'noActiva