Re: Notebook image problem



On Sat, Feb 02, 2008 at 03:48:59PM +0530, Antonio Bassinger wrote:
> Hi All,
> 
> Good Day!
> 
> I am new to GTK, and after googling for many hours I couldn't find an answer
> to my query. Hope you people can help.
> 
> I have a notebook. I wish to add images to the notebook tags. I have used
> 
> *gtk_notebook_insert_page(GTK_NOTEBOOK(notebook), frame, label, 3);
> 
> *Instead of label, if I use a button, I face a problem of dealing with so
> many buttons. Code shown below:
> 
> *button = gtk_button_new_with_label(buffer);*
> *image = gtk_image_new_from_file("/usr/share/XYZ.ppm");*
> *gtk_button_set_image(GTK_BUTTON(button), image);*
> *gtk_notebook_insert_page(GTK_NOTEBOOK(notebook), frame, button, 3);*
> 
> Maybe someone has an idea how to show a label and a image?

Why, oh why would you put a button inside the tabs?  Instead of the
button simply use an hbox and pack inside it an image and a label.

> Many Thanks
> Antonio

mike


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