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.
Asked
Active
Viewed 5,718 times
6
-
what kind of widget do you pack into scrolled window? – barti_ddu Dec 18 '10 at 17:42
-
To scrollable window I added a TextView widget. – m4tx Dec 18 '10 at 18:50
-
you can scroll TextView to the last TextBuffer iter then: http://library.gnome.org/devel/gtkmm/2.21/classGtk_1_1TextView.html#a9b23b8dbb4362c639abaa05ba9284d3b – barti_ddu Dec 18 '10 at 22:02
2 Answers
9
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());

ergosys
- 47,835
- 5
- 49
- 70
-
It does not work - displays the error "'Glib' has not been Declared". I'm not using Glib. – m4tx Dec 18 '10 at 18:44
3
Gtk without Glib would be some feat. :)
Make sure you can build and run this: Scrolling Example

Billy O'Connor
- 181
- 4