overrideredirect and Text widget

Sorin Schwimmer sxn02 at yahoo.com
Thu Sep 21 18:36:11 EDT 2006


Hi,

I'm trying to place in an undecorated window a Text widget, and a button to close the window/save widget's content. My test code is the following:

<code>

from Tkinter import *

root=Tk()

root['bg']='' # transparent background
root.overrideredirect(1) # get rid of border
root.geometry("+80+120") # place on screen

root.focus_set() # take focus

bt=Button(text="End",command=root.quit)
bt.grid(row=0, stick=E) # a button to allow window's closure
tx=Text(bg='white',height=3)
tx.grid() # a text widget
tx.focus() # give focus to text

root.mainloop()

</code>

On my machine it doesn't give focus to Text. Any advice?

Thanks,
Sorin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060921/ddf52151/attachment.html>


More information about the Python-list mailing list