0

I want one or several gtk.Entry reply to a button created by me (gtk.Button) instead of a enter key.

I´m using Python 2.7

Is it possible?

Zator
  • 13
  • 8
  • You can just call `entry.activate()` from the buttons "clicked" signal handler – Jussi Kukkonen Dec 09 '16 at 08:04
  • Thank you @jku.Could I make a modified class, which would also be sensitive to the focus switch to another gtk.Entry – Zator Dec 09 '16 at 08:39
  • Sure, take a look at the [focus-out-event](https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-focus-out-event) (but notice the atypical event mask requirement). I'd say that more often you'd want to look at the "notify::text" signal (which fires every time the entry "text" property changes) though. – Jussi Kukkonen Dec 09 '16 at 09:06
  • I create a new Entry class adding this line: self.connect('focus-out-event', self.onEntryActivate ) thanks @jku – Zator Dec 09 '16 at 09:14

1 Answers1

0

I create a new Entry class adding this line: self.connect('focus-out-event', self.onEntryActivate )

Zator
  • 13
  • 8