c++gtkscrolledwindow

GTK Scrolled Window - scroll to the bottom


I'm writing an app using GTK+, and I have a problem. I'm using GTK Scrolled Window and I must scroll the vertical scrollbar to the bottom, but I don't know, how. I was looking in Google, but I found nothing.


Solution

  • You must get the adjustment object (hadjustment, vadjustment), and then call methods on them. Assuming gtkmm, since you tagged this with c++, something like this:

    Glib::RefPtr<Adjustment> adj = win->get_vadjustment();
    adj->set_value(adj->get_upper());