Re: displaying 2 images from combobox

2007-03-07 Thread lucks

when i use this:

{
  GtkWidget *image = lookup_widget(GTK_WIDGET(combobox),
img_objectdesign);

   gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg);
}

it works...as you can see image is already declared in the first line. that
is GtkWidget *image=lookup...etc.
if i declare it at top like GtkWidget *image; there is an error saying
redefinition...so this doesnt solve the poblem..plz help

-- 
View this message in context: 
http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9353141
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


Re: displaying 2 images from combobox

2007-03-07 Thread lucks

thanks for the info...

am still having a lot of problems...you told me to declare it, so i did.but
still i cant. in fact am new to gtk+ and dont know too mucn but i have to
manage because i have to submit my project on gtk+..

i tried this too:

void
on_cbo_itemdesign_changed  (GtkComboBox *combobox,
gpointer user_data)
{ 
GtkWidget *image1;
GtkWidget *image;

 image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign);
 gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg);
 
 
 image1 = lookup_widget(GTK_WIDGET(combobox),  img_patterndesign);
gtk_image_set_from_file(GTK_IMAGE(image1), Pictures/myPattern.gif);

}

does someone know how to assign an image (e.g xxx.jpg) to a selected item
from a combobox?
i want to use an item from a combobox and then display its corresponding
image:

that is if i choose y from the combobox it should display the
corresponding xxx.jpg...plz help me:(
-- 
View this message in context: 
http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9360002
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


Re: displaying 2 images from combobox

2007-03-07 Thread lucks

thanks for the info...

am still having a lot of problems...you told me to declare it, so i did.but
still i cant. in fact am new to gtk+ and dont know too mucn but i have to
manage because i have to submit my project on gtk+..

i tried this too:

void
on_cbo_itemdesign_changed  (GtkComboBox *combobox,
gpointer user_data)
{ 
GtkWidget *image1;
GtkWidget *image;

 image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign);
 gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg);
 
 
 image1 = lookup_widget(GTK_WIDGET(combobox),  img_patterndesign);
gtk_image_set_from_file(GTK_IMAGE(image1), Pictures/myPattern.gif);

}

does someone know how to assign an image (e.g xxx.jpg) to a selected item
from a combobox?
i want to use an item from a combobox and then display its corresponding
image:

that is if i choose y from the combobox it should display the
corresponding xxx.jpg...plz help me:(
-- 
View this message in context: 
http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9360007
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


Re: displaying 2 images from combobox

2007-03-07 Thread Junior Polegato - GTK+ GTKmm
lucks escreveu:
  image1 = lookup_widget(GTK_WIDGET(combobox),  img_patterndesign);
   

Hi, you have a space between  and img_.

-- 
Yours Truly,

   Junior Polegato

   A pilgrim of problems; A parchment of solutions!
   Professional Page: http://www.juniorpolegato.com.br

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list