Re: gtk_tree_view_scroll_to_cell() not scrolling



Am Sonntag, den 16.05.2010, 15:26 +0200 schrieb Daniel Leidert:

I have the following problem. I have a list store with 4 columns. The
application has a notebook with 4 tabs. Each tab has a scrolled window
which shows one column of the list store. So for each column there is a
sort_model on top of a filter_model on top of the list model and a
tree_view per (sort_)model/column.

Now when I choose one item in the tree_view of a tab and change to
another tab, it should choose the related entry from the same row of the
list store. Because setting the selection doesn't scroll, I use
gtk_tree_view_scroll_to_cell() to scroll to this cell. But it doesn't
work. The selection is set and the function also gets the correct
values. But the selected item is not scrolled into the viewable area of
the tree_view.

I guess the problem is related to the fact, that the tree_view is inside
a GtkScrolledWindow (to precise: inside a GtkViewPort, which is inside
the GtkScrolledWindow). What's necessary to get the scrolling to work
here? Do you need the code?

Found the problem a few seconds later. The issue was described and
explained here:
http://mail.gnome.org/archives/gtk-app-devel-list/2010-January/msg00020.html

Fixed and everything works fine now.

Regards, Daniel




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