[gtkada] Changing a pixmap

Jean-Pierre Rosen rosen at adalog.fr
Thu Mar 27 14:22:00 CET 2003


>   Say you have this pixmap in a Vbox, then you will have to remove the
>   old pixmap and then pack the new pixmap into it.
> 
>       Pack_Start (Status_Vbox, Green_Pixmap, True, True, 0);
>    
>    now you want to put in the Red_Pixmap:
> 
>       Remove (Status_Vbox, Get_Child (Status_Vbox, 0));
>       Pack_Start (Status_Vbox, Red_Pixmap, True, True, 0);
>       Show_All (Status_Vbox);
> 
Thanks Preben, now I understand how it works. But...
The container is not a Vbox, but a Packer.
Packer has no Remove defined. Well, it inherits the one from Container.
The doc says (I read it :-) to use the Find_Child function to get the
actual Child of a Packer. But this is of type Gtk_Packer_Child, which is not
in Gtk_Widget_Record'Class, as expected by Remove...

In short: how do you remove an element from a Packer?
---------------------------------------------------------
           J-P. Rosen (rosen at adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



More information about the gtkada mailing list