Signals



use Gtk2 '-init';
use Glib qw/TRUE FALSE/;

$window = Gtk2::Window->new('toplevel');
$button = Gtk2::Button->new('MyButton');
$button->signal_connect('clicked' => \&handle);

sub handle {
   my $button = shift;
   $button->set_sensitive(FALSE);
   sleep 3;
}

How can I do set_sensitive make change in button before handle ends?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]