hi...am using gtk+ on windows and am using visual c++ as compiler..in fact am new to gtk+ programming and am having a difficulty in displaying 2 different images by selecting a single item from combobox...when i displayed for one image it works but to display another image for the same selected item doesnt work...can anyone help me please?
here is the code that am using for the combobox signal: void on_cbo_pickobject_changed (GtkComboBox *combobox, gpointer user_data) { gchar *mystr; mystr = gtk_combo_box_get_active_text (combobox); if (strcmp (mystr, "Chair 1") == 0) { /*****this will display the first image(Chair 1.jpg) in the img_objectpreview when Chair 1is selected from the combobox*******************/ GtkWidget *myimage_object = lookup_widget(GTK_WIDGET(combobox), "img_objectpreview"); gtk_image_set_from_file (GTK_IMAGE(myimage_object), "Pictures/Chair 1.jpg"); /*****i added this piece of code for a second image(Chair 1.gif) to be displayed in img_patternpreview********/ GtkWidget *myimage_pattern = lookup_widget(GTK_WIDGET(combobox), "img_patternpreview"); gtk_image_set_from_file (GTK_IMAGE(myimage_pattern), "Pictures/Chair 1.gif"); } else { ......./* show default image */ } g_free (mystr); } here is the error i got when compiled: callbacks.c(162) : error C2275: 'GtkWidget' : illegal use of this type as an expression callbacks.c(162) : error C2065: 'myimage_pattern' : undeclared identifier can someone please help me? what is missing in the code above? can someone add the missing code for me please?? how will it work? please help.. i would be much grateful if someone can help me please.. thanks -- View this message in context: http://www.nabble.com/displaying-2-images-tf3392267.html#a9443360 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list