[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    overrideredirect and Text widget
From:       Sorin Schwimmer <sxn02 () yahoo ! com>
Date:       2006-09-21 22:36:11
Message-ID: 20060921223611.88839.qmail () web56010 ! mail ! re3 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


[Attachment #5 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div \
style="font-family:times new roman, new york, times, \
serif;font-size:12pt"><div>Hi,<br><br>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:<br><br>&lt;code&gt;<br><br>from Tkinter import \
*<br><br>root=Tk()<br><br>root['bg']='' # transparent \
background<br>root.overrideredirect(1) # get rid of \
border<br>root.geometry("+80+120") # place on screen<br><br>root.focus_set() # take \
focus<br><br>bt=Button(text="End",command=root.quit)<br>bt.grid(row=0, stick=E) # a \
button to allow window's closure<br>tx=Text(bg='white',height=3)<br>tx.grid() # a \
text widget<br>tx.focus() # give focus to \
text<br><br>root.mainloop()<br><br>&lt;/code&gt;<br><br>On my machine it doesn't give \
focus to Text. Any advice?<br><br>Thanks,<br>Sorin<br></div></div></body></html>



-- 
http://mail.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic