On 29.09.2011, at 13:56, Olaf Devik wrote:
> 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.
What exactly are you doing? A later signal handler might revert the effects of
your call. However this works for me:
import gtk
e = gtk.Entry()
b = gtk.Button("Save")
b.connect('clicked', lambda w: e.grab_focus())
c = gtk.VBox()
c.pack_start(e)
c.pack_end(b)
w = gtk.Window()
w.add(c)
w.connect('delete-event', gtk.main_quit)
w.show_all()
gtk.main()
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/