Re: [gtk-list] Re: Clist within scrolled window
- From: Kent Schumacher <kent structural-wood com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Clist within scrolled window
- Date: Mon, 25 Oct 1999 13:05:04 -0500
Federico Mena Quintero wrote:
> > I agree that this is the proper function but I have never been able to
> > get it to work. A quick guess at the problem is that the function
> > adjust_adjustments() overrides the value that is set in move_vertical().
> >
> [snippety snip]
> > > formats_list = gtk_clist_new(1);
> > > gtk_scrolled_window_add_with_viewport
> > > (GTK_SCROLLED_WINDOW (formats_viewport), formats_list);
>
> You don't need to use gtk_scrolled_window_add_with_viewport() for the
> GtkCList widget, since it properly supports the GtkScrolledWindow
> scrolling magic. You should just use
>
> gtk_container_add (GTK_CONTAINER (my_scrollwin), formats_list);
>
> Federico
Agreed, but making that change does not make gtk_clist_moveto work correctly.
One of the problems is that the 'upper' value in the vertical adjustment in gtk_clist
is not updated as entries are added to the clist.
I attempted patching gtk_clist_moveto to call adjust_adjustments() before calculating
the adjustment value, but a later call to adjust_adjustments() in the gtk_clist undoes
my value.
I haven't worked my way through the logic of it all yet, so I haven't come up with a
decent patch.
I suspect that I might be able to put the widget into a state (like 'realized') that would
cause some of the state variables of the widget to be updated, so that adjustment
values would correctly reflect entries, but I do not understand the implications of this
well enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]