Find path under mouse
- From: Daniel Kasak <d j kasak dk gmail com>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Find path under mouse
- Date: Thu, 18 May 2017 16:34:28 +1000
Hi all.
Back in gtk+-2.x, I had some code that could find the path underneath
the mouse ( I was looking for double-click events in a treeview in
this case ):
---
my ( $self, $treeview, $event ) = @_;
if ( $event->type eq '2button-press' ) {
# A double-click event
if ( $event->window == $treeview->get_bin_window ) {
my ( $path, $column, $cell_x, $cell_y ) =
$treeview->get_path_at_pos ( $event->x, $event->y );
---
Now I'm doing something similar in gtk+-3.x. I've set up an event
handler for keypress events, and I'm successfully catching the CTRL-C
keypress event. But I don't see immediately how to get the path /
position under the mouse ...
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]