Change the label of GtkButton

Posted by paultop6 on Stack Overflow See other posts from Stack Overflow or by paultop6
Published on 2010-05-06T08:41:55Z Indexed on 2010/05/06 8:48 UTC
Read the original article Hit count: 169

Filed under:
|
|
|

I want to be able to change the label of a GtkButton after the widget has been shown

char *ButtonStance == "Connect";
GtkWidget *EntryButton = gtk_button_new_with_label(ButtonStance);

gtk_box_pack_start(GTK_BOX(ButtonVbox), EntryButton, TRUE, TRUE, 0);

gtk_box_pack_start(GTK_BOX(TopVbox), ButtonVbox, TRUE, TRUE, 0);

gtk_widget_show_all(TopVbox);

ButtonStance == "Disconnect";

gtk_button_set_label(GTK_BUTTON(EntryButton), ButtonStance);

gtk_main();

Does anyone know how to do this?

© Stack Overflow or respective owner

Related posts about c

    Related posts about gtk