On Tue, Dec 22, 2009 at 1:27 PM, Andrew Wood <ajw...@theiet.org> wrote: > Am I right in thinking a GtkScrolledWindow can only have 1 child (a > GtkViewPort) and that the GtkViewPort can only have one child also? > > If this is correct. Having added a widget a GtkVBox to a GtkScrolledWindow > using: > > gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollview),GTK_WIDGET(vbox)); > > How can I then remove the vbox and its viewport from the GtkScrolledWindow > so the GtkScrolledWindow has no children, so that > gtk_scrolled_window_add_with_viewport can be called again > > Would it be correct to use > > gtk_bin_get_child(GTK_BIN(scrollview))=NULL >
No you cannot assign a value to the return value of gtk_bin_get_child(). Use: gtk_container_remove (GTK_CONTAINER (scrollview), gtk_bin_get_child(GTK_BIN(scrollview))); Cheers, -Tristan > > > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list