Re: displaying 2 images from combobox



On Wed, Mar 07, 2007 at 04:50:40AM -0800, lucks wrote:
{
       
  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..

In C (at least until C99) declarations have to be at the
start of the corresponding code block.  The declaration of
image1 isn't.

Yeti


--
Whatever.



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