gnope php gtk gui gnope.org  

Removing a hbox which is inside a vbox

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
srynoname



Joined: 13 Aug 2006
Posts: 9

PostPosted: Wed Aug 16, 2006 5:54 pm    Post subject: Removing a hbox which is inside a vbox Reply with quote

hello,
how do i properly remove a hbox which is inside a vbox? when i tried
$window->remove($hbox);
i get the following error:
Code:
(test2.php:3800): Gtk-CRITICAL **: gtk_container_remove: assertion `GTK_IS_TOOLB
AR (container) || widget->parent == GTK_WIDGET (container)' failed

when i played around with my code, i got an error/hint about this:
5.19. How do I reparent a widget?
http://www.gtk.org/faq/#AEN636
but i'm not sure if this is really what i'm looking for, also gtk_container_remove() and maybe also the other functions seem not to be available on phpgtk.

please help, thanks in advance.
Back to top
scott



Joined: 16 Feb 2006
Posts: 35

PostPosted: Wed Aug 16, 2006 7:07 pm    Post subject: Reply with quote

You are trying to remove the box from the wrong container. You need to remove it from the vbox not the window.
Code:
$hbox->get_parent()->remove($hbox)

or
Code:
$vbox->remove($hbox)
Back to top
srynoname



Joined: 13 Aug 2006
Posts: 9

PostPosted: Thu Aug 17, 2006 5:42 pm    Post subject: Reply with quote

thank you very much, i always tried $window->remove and than in the brackets sth. like that your wrote \:
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.