[EMAIL PROTECTED] wrote:
>hi all .
> how can we change the label of button after clicking it ...
> i mean..i have set one label for the buttton..and i want to change it
>when i click on the button...
>
> plz help...
> thanx...
>
>
just do smth like this:
---
void button_clicked(GtkButton *button, gpointer data)
{
static gint button_click_count=0;
gchar label[32];
sprintf(label, "label N%d", button_click_count++);
gtk_button_set_label(button, label);
}
void button_setup()
{
GtkWidget *button;
...
button = gtk_button_new_with_label("label N0");
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(button_clicked), NULL);
gtk_widget_show(button);
...
}
---
Olexiy
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list