Re: gtk_button_set_label ERROR

Thanks for everybody who has responded.

Here is the code that create's the button:
  button1 = gtk_button_new_with_mnemonic (x);
  gtk_widget_show (button1);
  gtk_box_pack_start (GTK_BOX (hbox1), button1, FALSE, FALSE, 0);

and here is the function where I'm trying to change the label:
gboolean Func_Get_Time_Date()
        memset( x, '\0', 150 * sizeof *x );
        char *p;
        GtkWidget *button1 = 0;

        strstr ( cmd_results, argument_data) == NULL)
                sprintf( x, "args: %s", argument_data);
                gtk_button_set_label (GTK_BUTTON(button1), x);          

        return TRUE;

There is also another function which gets the value of x before the window
and button are created and that works...however when the above function runs
I get the error. I'm sure it's something simple..

Thanks a lot.
View this message in context:
Sent from the Gtk+ - Apps Dev forum at

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