[Glade-users] Hide and show function

James Cameron james.cameron@compaq.com
Fri, 12 Jan 2001 09:30:56 +1100


pcc0d3r@basari.net.tr wrote:
> I want to make a app that is going to hide button 2 when we
> clicked on button1.

If it was an application that I was going to use, I'd change your source
code to set the other button insensitive rather than hide it.  Marking
it insensitive leaves it present on screen, and so geometry negotiation
does not need to occur.  The user also finds this easier to comprehend
than a constantly changing interface.

gtk_widget_set_sensitive (GTK_WIDGET(button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET(button), TRUE);

And as Philippe said ... you were passing the wrong widget pointer to
the hide function.

-- 
James Cameron                                 (james.cameron@compaq.com)

http://quozl.linux.org.au/         (or)         http://quozl.netrek.org/