gtk_widget_modify_bg - does not work



what am I doing wrong in Following Code 
 
GtkWidget *button1;
void click_button1(GtkWidget *widget, gpointer data)
{
  GdkColor color;
  color.red = 27000;
  color.green = 30325;
  color.blue = 34181;
  gtk_widget_modify_bg(GTK_WIDGET(widget), GTK_STATE_NORMAL, &color);
}
some_callback_func()
{  ....
     gtk_button_clicked(GTK_BUTTON(button1));
   ..... }
main()
{
   button1 = gtk_button_new_with_label ("button1");
    g_signal_connect(G_OBJECT(button1), "clicked", G_CALLBACK(click_button1), NULL);      
    gtk_widget_show_all (window);
    gtk_main();
    return 0;
}


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