RE: Clicking through to TreeView



Hello everyone!

Hi :)


Is there a way in TreeView & co. that the mouse clicks go 
through to the
underlaying widget without first having to select a row? I.e. I have a
TreeView with mode set to GTK_SELECTION_NONE and toggle 
buttons packed in
columns, but to toggle a particular button, the first click 
gets "used" to
select a row and only the second click actually toggles the 
button. Any
idea how to overcome this need for the first click?


You could probably Not select anything (as you do already) and then capture the button_press_event for the 
GtkTreeView, then find the cell renderer based on the mouse co-ordinates. - Then you could get the informtion 
from the cell and do what you will with it.

Have a look at:
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-get-path-at-pos

and you might need:
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-widget-to-tree-coords
or
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-tree-to-widget-coords


Regards,
Martyn



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