GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Apr 25, 2014 5:05 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: diffrence between destroy and hide
PostPosted: Thu Nov 23, 2006 12:15 pm 
Offline
GTK+ Geek

Joined: Fri Oct 06, 2006 6:37 am
Posts: 57
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 4:24 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group