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.
GTK Scrolled Window - scroll to the bottom
Asked Answered
what kind of widget do you pack into scrolled window? –
Ribble
To scrollable window I added a TextView widget. –
Cloverleaf
you can scroll TextView to the last TextBuffer iter then: library.gnome.org/devel/gtkmm/2.21/… –
Ribble
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());
It does not work - displays the error "'Glib' has not been Declared". I'm not using Glib. –
Cloverleaf
Gtk without Glib would be some feat. :)
Make sure you can build and run this: Scrolling Example
© 2022 - 2024 — McMap. All rights reserved.