Re: Scrolled widgets




Per Erik Stendahl <berrs@update.uu.se> writes:

> Hi.
> 
> Given a pointer to some unknown widget, is it possible to determine
> whether I should use gtk_scrolled_window_add_with_viewport() or
> gtk_container_add() to add that widget to a GtkScrolledWindow?

Arjan's answer is correct. I would emphasize (as he indicated)
that for a language binding it would be poor form if you added
the viewport automatically.

We used to do to this in GTK+, but this causes problems if
somebody does:

 gtk_container_add (GTK_CONTAINER (sw), some_widget);

and then tries to do:

 gtk_container_remove (GTK_CONTAINER (sw), some_widget);

Plus, maintaining consistancy between GTK+ and all language
bindings will help maintain the usefulness of tutorial
and reference documentation across language bindings.

Regards,
                                        Owen



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