Re: use a picture and a label as gtk_notebook_tab_label
- From: Christian Neumair <chris gnome-de org>
- To: rupert <rupertt gmail com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: use a picture and a label as gtk_notebook_tab_label
- Date: Sat, 22 Jul 2006 19:06:22 +0200
Am Samstag, den 22.07.2006, 17:07 +0200 schrieb rupert:
Im trying to use an image and a gtk_label as a tab_label.
I pack both into a hbox and put this hbox as the tablabel in the append_page
option:
[code]
mainbook = gtk_notebook_new ();
gtk_box_pack_start(GTK_BOX (vboxmain), mainbook, TRUE, TRUE, 0);
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mainbook), GTK_POS_TOP);
gtk_widget_show (mainbook);
book_samba = gtk_label_new ("SAMBA");
image1 = g_object_new(GTK_TYPE_IMAGE,"file", "pics/ledred.png", NULL);
samba_hbox = gtk_hbox_new(FALSE, 0);
gtk_widget_show(samba_hbox);
gtk_box_pack_start(GTK_BOX(samba_hbox), book_samba, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(samba_hbox), image1, TRUE, TRUE, 0)
gtk_notebook_append_page(mainbook, vbox1, samba_hbox);
[/code]
so what am I doing wrong, i also tried gtk_container_add() with the
same(none) result.
Try calling gtk_widget_show() on the label and the image, or
gtk_widget_show_all() on the hbox.
--
Christian Neumair <chris gnome-de org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]