overrideredirect vs. text entry etc. widget

Sean DiZazzo half.italian at gmail.com
Tue Sep 15 11:42:42 EDT 2009


On Sep 14, 10:43 pm, kernus <ker... at gmail.com> wrote:
> I just googled this post:
>
> http://mail.python.org/pipermail/python-list/2006-September/575832.html
>
> something like:
>
> from Tkinter import *
>
> root = Tk()
> Entry(root).pack()
> Button(root, text='Quit', command=sys.exit).pack()
> root.overrideredirect(1)
> root.mainloop()
>
> the button works boths under linux(debian) and windows, but the entry
> widget only works on windows, any idea?
>
> I am making a skinnalbe music player, so the issue must be solved.

Whats interesting is that if you call overrideredirect from a button
command, it works as expected.  Well, at least the text entry field
behaves for me on Ubuntu...

from Tkinter import *

root = Tk()

def override():
    if root.overrideredirect():
        root.overrideredirect(False)
    else:
        root.overrideredirect(True)

    root.withdraw()
    root.deiconify()

Entry(root).pack()
Button(root, text='Override', command=override).pack()
root.mainloop()

~Sean



More information about the Python-list mailing list