Scroll position problem (gtk2)
- From: "Matthew A. Postiff" <postiffm comcast net>
- To: gtk-app-devel-list gnome org
- Subject: Scroll position problem (gtk2)
- Date: Sat, 26 Aug 2017 22:23:35 -0400
I have a GtkWidget *A that contains another GtkWidget *B. The web
content of B changes from B_1 to B_2 when the user clicks a link inside
of it. When I click the "Back" button in B_2, I want it to return to B_1
at the last known scroll position. This is the code that I thought would
do it--by remembering the former vertical adjustment and then setting it
once the old content re-appears:
webkit_web_view_load_string (WEBKIT_WEB_VIEW (B), htmlwriter.html.c_str(), NULL, NULL, NULL);
// Scroll to the position that was stored while this url was last active.
GtkAdjustment * adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (A));
gtk_adjustment_set_value (adjustment, scrolling_position[active_url]); <<=== This line doesn't do
anything
scrolling_position[active_url] returns a value, say 1000, and the
gtk_adjustment_set doesn't seem to have any effect.
Any pointers on how to fix this?
Thank you,
Matt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]