Re: How to get the first visible row in a tree view?
- From: Gabriel de Perthuis <Gabriel de-Perthuis laPoste net>
- To: gtk-app-devel-list gnome org
- Subject: Re: How to get the first visible row in a tree view?
- Date: Sun, 13 Mar 2005 20:28:10 +0100
Le dimanche 13 mars 2005 Ã 20:12 +0100, Gabriel de Perthuis a Ãcrit :
Le dimanche 13 mars 2005 Ã 19:14 +0000, David Rosal a Ãcrit :
The question is: is there any way to know the contents of the first
visible row in a tree view?
gtk_tree_view_get_tree_path_at_pos with the right position should do.
Except getting the right position would be dirty - I don't know how to
get the offset of the content part, which depends if there are headers
visible.
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]