[pygtk] Setting focus to a textEntry

Olaf Devik olaf.devik at mollefaret.no
Thu Sep 29 19:56:56 WST 2011


I have a puzzling problem.

I enter data into a number of textentries, when finished there is a save 
button which collects the textEntries, runs a procedure which saves them 
to a treelist, this procedure calls another procedure which prepares the 
textentries with new default values. So far so good.

But when the data is saved, I want the focus to go to a particular entry 
field. I

I have tried grab_focus and have verified by checking which widget has 
focus. But I can not see that this is happening in the window and using 
TAB, apparently the active widget still is the save button.

Seems there is something I have overlooked.

How can I ensure that a textEntry has focus and are ready for new input 
after saving?

-- 
Regards

Olaf Devik
e-mail: olaf.devik at mollefaret.no
mobile: +47 911 70 849



More information about the pygtk mailing list