GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

diffrence between destroy and hide

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
cnu_sree
GTK+ Geek


Joined: 06 Oct 2006
Posts: 57

PostPosted: Thu Nov 23, 2006 12:15 pm    Post subject: diffrence between destroy and hide Reply with quote

wht is the diffrence between gtk_widget_destroy and gtk_widget_hide.
i know tht destroy will destroy the object and hide will not destroy the object.
while iam using destroy iam getting Xlib error when i replace this with hide then working finee.
so please tell me the diffrence.
thank u.
sree
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 386
Location: Fairfax, Virginia

PostPosted: Thu Nov 23, 2006 4:24 pm    Post subject: Reply with quote

Could you provide some code? One thing that you have to realize is that destroying a widget will also destroy all children. If you then make any call on any of them, you will get an error.

gtk_widget_hide() will set only that widget as non-visible. All of its children will also be hidden, but they will not be set as invisible in properties. If you call gtk_widget_show() on that widget, all of its children will then be visible again. Calling gtk_widget_hide_all() will set the visibility property of every child widget to FALSE as well. If you call gtk_widget_show() on that widget instead of gtk_widget_show_all(), the children will still be hidden.

If you are having a specific problem, please always post some code ... otherwise it is impossible to diagnose your problem, even if you do provide an error.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP