[gtkada] adding and removing widgets in a container

Torsten Leistikow leistikow at stn-atlas.de
Thu Nov 29 08:42:18 CET 2001


Hallo,

I am trying to exchange the widgets displayed in a container. Therefor I
created a widget (Label) and a container (Frame) and used the Add and Remove
functions:

Add (Frame, Label);

No problem here.

Remove (Frame, Label);

No Problem here.

Add (Frame, Label);

Now I get the error message

gtk-CRITICAL **: file gtkcontainer.c: line 714 (gtk_container_add):
assertion `GTK_IS_WIDGET (widget)´ failed

and Label is not added to Frame.

Since the GtkAda reference manual says for the Remove procedure: "Widget is
not destroyed, but is deleted from the screen.", I didn't expect any
problems here.

So how can I exchange the widgets of a container?

Gruss
Torsten





More information about the gtkada mailing list