Re: closing a window



Chaitanya RD Kulkarni wrote:

hi!
i have developed an application using gtk2.0.in my application,along with other windows, there's a window with a button on it.i want to destroy this window when i click the button. i tried using gtk_widget_destroy, with (gpointer)window as the function to be called when the button is clicked, but it destroys just the button & not the whole window.i don't want to CLOSE my application, so i cant use gtk_main_quit.what shall i do?is there a function using which i can do this??i want to click a button in a window & that window should be destroyed. Please help!!!
-chaitanya.
Use g_signal_connect_swapped() function to connect your callback:
g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), window);

   Olexiy




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