Re: How to get the first visible row in a tree view?



Gabriel de Perthuis wrote:

Better:

GdkRectangle r;
int xw, yw;
GtkTreePath* path = gtk_tree_path_new();

gtk_tree_view_get_visible_rect(tv, &r);
gtk_tree_view_tree_to_widget_coords(tv, r.x, r.y, &xw, &yw);
gtk_tree_view_get_tree_path_at_pos(tv, xw, xy, &path, NULL, NULL, NULL);


It works!
It gives me a valid path and I can retrieve the filename.

But I get this warning:

Gtk-CRITICAL **: gtk_tree_view_get_path_at_pos: assertion `tree_view->priv->bin_window != NULL' failed


I can't guess what could it mean.


[ excuse me Gabriel for the flood of emails ]

--
David Rosal
<david rosal upf edu>




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