displaying 2 images from combobox
- From: lucks <a luckhee gmail com>
- To: gtk-app-devel-list gnome org
- Subject: displaying 2 images from combobox
- Date: Wed, 7 Mar 2007 04:50:40 -0800 (PST)
hi...i just managed to display an image from a combobox using the signal:
void
on_cbo_itemdesign_changed (GtkComboBox *combobox,
gpointer user_data)
{
GtkWidget *image = lookup_widget(GTK_WIDGET(combobox),
"img_objectdesign");
gtk_image_set_from_file (GTK_IMAGE(image), "Pictures/baby.jpg");
}
now i want to display another image on another image widget using the same
signal..that is when choosing an item from the combobox...i`ve tried the
following code but it doesn`t work...and am having the following errors):
void
on_cbo_itemdesign_changed (GtkComboBox *combobox,
//using same signal
gpointer user_data)
{
GtkWidget *image = lookup_widget(GTK_WIDGET(combobox),
"img_objectdesign"); // name of image
widget:img_objectdesign
gtk_image_set_from_file (GTK_IMAGE(image), "Pictures/baby.jpg");
//display first image
GtkWidget *image1 = lookup_widget(GTK_WIDGET(combobox), "
img_patterndesign");
gtk_image_set_from_file (GTK_IMAGE(image1), "Pictures/myPattern.gif");//
second image
}
error C2275: 'GtkWidget' : illegal use of this type as an expression
error C2065: 'image1' : undeclared identifier
please note that the first code for the single image works but when i repeat
the same for another it doesnt work..
any help would be appreciated...thanks
please note that the
--
View this message in context: http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9352256
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]