[maemo-developers] Unable to display icon using gtk_button_new_from_stock

From: Pallavi Kandhare pallavi.kandhare at yahoo.com
Date: Wed Jul 7 09:21:59 EEST 2010
Hello,
I am using GTK 2.0 and "gtk_button_new_from_stock" for displaying icon and label on a button. But "gtk_button_new_from_stock" displays only label and not the icon.
Sample code:

GtkWidget *button;
button = gtk_button_new_with_label(_("Test button"));
button = gtk_button_new_from_stock (GTK_STOCK_NEW) ;
gtk_container_add(GTK_CONTAINER(window),  button);
gtk_widget_show_all ( GTK_WIDGET ( window ) );

Any help is appreciated.

Thanks.


      

More information about the maemo-developers mailing list