GtkTreeView problem
- From: Laszlo Kovacs <laszlo kovacs Sun COM>
- To: gtk-list gnome org
- Subject: GtkTreeView problem
- Date: Thu, 24 Apr 2003 17:12:51 +0100
Hi All,
I have to write a piece of code that returns the widget that the user
clicked on and the coordinates where the click happened relative to the
widget.
I had something that caught the button press event, took the coordinates
from it and called gtk_get_event_widget() on the event to get the widget.
This worked well until I hit into GtkTreeView. The problem is that
GtkTreeViewColumn has a window and it sets the parent GtkTreeView as
this window's user data. As gtk_get_event_widget() takes the gdk window
from the event and queries its user data to get the widget the above
algorithm does not work anymore as the coordinates are given relative to
the GtkTreeViewColumn's window while the widget returned is the
GtkTreeView. I also noticed that the docs call GtkTreeViewColumn an
"object", is this a widget or not?
If this is not a bug in gtk+ then I need some different approach.
Something like ignoring the event coordinates and getting the mouse
pointer relative to the GtkTreeView widget's window (using
gdk_window_get_pointer()) would probably help, but is this the right
approach or I am missing the point completely?
Thanks,
Laszlo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]