Re: [gtk-list] Re: closing windows



Alexander Kotelnikov wrote:

> On Wed, 16 Dec 1998, David Given wrote:
>
> > >I push one button and my program opens new window, I want to know how can
> > >I make another button to close new window clicking on it.
> >
> > gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
> >       GTK_SIGNAL_FUNC(gtk_widget_destroy), (gpointer)window,
> >       NULL);
> >
> > This will automatically destroy the window when you click on the button.
>
> And what will be the difference with:
>
>  gtk_signal_connect(GTK_OBJECT(button), "clicked",
>        GTK_SIGNAL_FUNC(gtk_widget_hide), window);
>
> ?
> Thanks,
> _____
> Alexander Kotelnikov
> Saint-Petersburg, Russia
> mailto:sasha@ak2614.spb.edu
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

The same difference as beetwen "hide" and "destroy". With "hide", the window
still exists and can be shown again with "show".  With "destroy", the window no
longer exists, if you want it again, you have to re-create it.

I think it's essentially a memory problem.

Please correct me if i'm wrong.

Patrick



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]