I recently added a FAQ entry on how to make an entry box activate the default for gtk.Dialog
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq10.012.htp Now I am trying to figure out how to do the same for entry boxes in a gtk.Toolbar. I have an entry box and a button and when the button is clicked, the value in the entry box is read and a function is called. Now I want ENTER in the entry box to trigger the button's action. I tried this: iconw = gtk.Image() iconw.set_from_stock(gtk.STOCK_REDO, iconSize) self.bJump = self.append_item( 'Jump', 'Jump to time', 'Private', iconw, self.jump_to) self.bJump.set_flags(gtk.CAN_DEFAULT) self.entryJump = gtk.Entry() self.entryJump.show() self.entryJump.set_width_chars(8) self.entryJump.set_activates_default(gtk.TRUE) self.bJump.grab_default() self.append_widget(self.entryJump, 'Jump to time', 'Jump to time') self.append_space() But got the error message (work.py:7697): Gtk-WARNING **: gtkwidget.c:3510: widget not within a GtkWindow on the call to set_flags. Any suggestions? John Hunter pygtk 1.99.16 _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
