Re: GtkComboBox and focus change events

From: Date: Mon, 13 Mar 2006 14:00:58 +0000
Subject: Re: GtkComboBox and focus change events
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6785@lists.php.net to get a copy of this message
André Jansen wrote:
I've been pulling my hair out over connecting a callback to the 'focus-in- event' and 'focus-out-event' signals on a GtkComboBox.
Try using focus instead of focus-in-event. I am not having trouble with focus-out-event. The script below works for me. Every time I tab to or from the combo box TEST is printed to the terminal. <?php function printFocus() {
        echo "TEST\n";
} $window = new GtkWindow(); $window->connect_simple('destroy', array('Gtk', 'main_quit')); $combo = new GtkComboBox(); $combo->connect_simple('focus', 'printFocus'); $combo->connect_simple('focus-out-event', 'printFocus'); $vBox = new GtkVBox(); $vBox->add($combo); $vBox->add(new GtkButton('TEST')); $window->add($vBox); $window->show_all(); Gtk::main(); ?> -- Scott Mattocks http://www.crisscott.com

« previous php.gtk.general (#6785) next »