On Mon, 2005-05-16 at 12:41 +0200, tapia wrote:
> Hi. 
> 
> I'm trying to switch some widgets in a ScrolledWindow. The idea is
> extract the child widget, and insert another one. The new one is a gecko
> WebControl, so I have to insert it with AddWithViewport. 
> 
> The result I have is an empty scrolledwindow, and the WebControl showing
> in another window! 
> 
> This is the code: 
> 
> itemShelf.Unparent (); 

You don't want to be using Unparent(). Unparent() is an internal method
for use when implementing the OnRemoved method in a Gtk.Container
subclass. To remove a widget from its parent, call its parent's Remove()
method:

        whateverItemShelfsParentIs.Remove (itemShelf);

or if you don't have a reference to its parent handy, you could do:

        ((Gtk.Container)itemShelf.Parent).Remove (itemShelf);

-- Dan


_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to