Hi,

Howard Zhou <[EMAIL PROTECTED]> writes:


> I tried to switch between text object
> in a scrolled window by calling remove() then add(*_)
> because the trial with just calling add(*_) does not
> work. But I found that remove() will actually delete
> the text object I put in first.

the container (scrolled window) takes ownership of the
object you add to it and sinks it. All GTK+ containers
behave like this. You need to change your code to:

  gtk_object_ref (object1);
  container_add (container, object1);
  ...
  container_remove (container, object1);
  container_add (container, object2);

Then don't forget to unref your object as soon as you
don't need it anymore.


Salut, Sven

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to