Re: Deleting random number of buttons...
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: 3saul <saul_lethbridge hotmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Deleting random number of buttons...
- Date: Tue, 06 Jun 2006 23:49:12 -0400
3saul wrote:
I'm creating some buttons like this
GtkWidget **
add_buttons( GtkWidget *parent, int n )
{
GtkWidget **buttons = g_new( GtkWidget *, n );
for( i = 0; i < n ; i++ ) {
char label[256];
snprintf( label, 256, "button %d", i );
buttons[i] = gtk_button_new_with_label( label );
gtk_contaner_add( GTK_CONTAINER( parent ), buttons[i] );
gtk_widget_show( buttons[i] );
}
return( buttons );
}
How can I delete this buttons once they're created?
They belong to the container once they are added, before that
they are considered "floating" (so when the container is finalized;
so are the buttons).
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]