Reputation: 175
I have ScrolledWindow (inside is a TreeView) and I need to scroll to top. Do you have some idea? Every answer would be very appreciated. Thanks
Upvotes: 2
Views: 2148
Reputation: 164
In GTK# for a variable named scrollWin
of type GtkScrolledWindow
scrollWin.Vadjustment.Value = 0;
Upvotes: 1
Reputation: 49039
In GTk+ you basically get the vertical adjustment for the scrolled window and use it to set the scroll position. I don't know gtk# details, but here's how in c++ (gtkmm):
scrollWin.get_vadjustment()->set_value(0);
Gtk# should be similar.
Upvotes: 4