Re: How to remenber the scroll bar position?
- From: Nicolas Joseph <nicolas joseph valaide org>
- To: gtk-list gnome org
- Subject: Re: How to remenber the scroll bar position?
- Date: Thu, 22 Jul 2010 22:35:00 +0200
Le 21/07/2010 23:12, Nicolas Joseph a écrit :
> Hello,
>
> I refresh a treeview and I would like restore the old position of the
> scoll bar.
>
> Before clearing the treesore, I save the original postion:
>
> var vscrool_bar = this.scrolled_window.get_vscrollbar () as
> Gtk.VScrollbar;
> double position = vscrool_bar.get_value ();
>
> And after repopulate, I restore this value:
>
> vscrool_bar.set_value (position);
>
> But the scroll bar don't move and the signal value-changed is not emit.
>
> Have you an idea?
>
> Thank's in advance.
I searched in the pino code source (when the timeline is update, the
scroll bar return at its old position) and the code is similar:
http://code.google.com/p/pino-twitter/source/browse/src/timeline_list_abstract.vala#89
But the scrollbar position is restored via callback. Is it necessary to
wait some time between the restoration of the contents of the liststore
and the position of the scroolbar?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]