Holding Down a Button

From: Date: Thu, 02 Dec 2004 21:29:43 +0000
Subject: Holding Down a Button
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5291@lists.php.net to get a copy of this message
Hello, I want a value to be incremented while a user is clicks and holds down a button on a GtkButton. I am a little confused about how to do it though. Do I need to use gtk::events_pending and gtk::main_iteration_do? If so, how would I do that? Something like this? $this->connect_object('button-press-event', array(&$this, 'incValue'), 5) ... function incValue($value) {
    $this->value += $value;
    while (gtk::events_pending()) {
        gtk::main_iteration_do();
    }
} I don't see how that would keep incrementing unless the event is fired each iteration. Is that what happens? Thanks, -- Scott Mattocks scott@crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks

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