Re: GtkCList and mouse right click
| From: | Steph | Date: | Mon, 03 Jun 2002 12:22:14 +0000 |
| Subject: | Re: GtkCList and mouse right click | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2080@lists.php.net to get a copy of this message | ||
Hi,
The signal you should be connecting to is the 'button-press-event' signal (look under
GtkWidget for event signals). The event signal carries the event itself - you can test this event
to find out whether it is a GDK_BUTTON_PRESS or a GDK_2BUTTON_PRESS. You can further test a
GDK_BUTTON_PRESS event's button property - if($event->button == 3) then $event == a right
click.
Sorry, event properties aren't (can't be) covered in the manual yet, so it's either a
case of asking here or digging around in the GTK API docs.
HTH
Steph
----- Original Message -----
From: "Yrgo" <gorm@hot.ee>
To: <php-gtk-general@lists.php.net>
Sent: Monday, June 03, 2002 12:04 PM
Subject: [PHP-GTK] GtkCList and mouse right click
> Hi,
> I have an application with GtkCList. I would like to distinguish between double-click and
> right-click events. How could i do that
>
> # $list is my GtkCList object
>
> ...
>
> $list->connect('event', array(&$this, 'my_func'));
> ...
>
> function my_func($obj, $evt) {
>
> if ( double-click-detected )
> $this->handle-doubleclick();
> if ( right-click-detected )
> $this->handle-right-click();
> }
>
>
> So, I'd like to know how to catch double-click-detected and right-click-detected?
> I've fount GDK_2BUTTON_PRESS, but it didn't seemed to work for me.
> What should I do?
>
> -----------------------------------------
> Teatri- , kino- ja kontserdipiletid nüüd hiirekliki kaugusel!
> http://www.hot.ee
>
>
--------------------------------------------------------------------------------
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php