Re: [gtk-list] Automatic Scrolling w/Scrolled Window



What I do is to keep track of the last row returned from
gtk_clist_append (clist, *text[]) and use that for gtk_clist_moveto
(GtkClist *clist,
		                gint     row,
				gint     column,
				gfloat   row_align,
				gfloat   col_align);
There's more on this and the align args in the tutorial also.

HTH,
	Stephen

Shannon Rause wrote:
> 
> I have a GtkList that is attached to a scrolled window with
> gtk_scrolled_window_add_with_viewport.  The GtkList contains messages that have
> been sent/received from/to my application so it is updated continuously.  New
> list items are added to the end of the list.  I would like to autmatically have
> the scrollbars 'jump' to the bottoom whenever a new list item is added.
> Basically mimic the behaviour of GtkText (I don't want to use GtkText,
> though).  Does anyone know how to do this.  Everything I have tried does not
> work.  I have tried:
> 
> 1.  Using gtk_adjustment_set_value to change the adjustment
> 2.  Set the values by hand and sending the "changed" and "value_changed" signals
> 3.  Getting the adjustment, creating a new one, and setting the new adjustment
> 
> Thanks,
> shannon
> 
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]