Gtk, How to scroll at bottom of viewport list?
Posted
by PP
on Stack Overflow
See other posts from Stack Overflow
or by PP
Published on 2010-04-21T08:58:39Z
Indexed on
2010/04/21
9:03 UTC
Read the original article
Hit count: 166
I have created one list with GtkVBox and GtkViewPort.
and i am doing the scroll by two up/down GtkButtons.
GtkAdjustment* adjustment;
adjustment = gtk_viewport_get_vadjustment(GTK_VIEWPORT(viewport_ptr));
gtk_adjustment_set_value(adjustment, gtk_adjustment_get_value(adjustment)+(gdouble)SCROLL_SIZE);
gtk_widget_show_all(viewport_ptr);
But when I add the widget to VBox it gets added at the end of the VBox as I am using gtk_box_pack_start
. So i want to scroll viewport up to this newly added last widget which is at bottom of the list.
© Stack Overflow or respective owner