Re: Trying to display image in a menu.
- From: "Maher Awamy" <muhri muhri net>
- To: Kervin Pierre <kpierre fit edu>, gtk-app-devel-list gnome org
- Subject: Re: Trying to display image in a menu.
- Date: 22 Oct 2000 19:52:01 CDT
On Sun, 22 Oct 2000 20:45:41 -0400, Kervin Pierre said:
Hello,
I'm writing a menu program similar to a floating "start button".
I need to display an image next to each of the sub-menu entries in my
menu, eg. as with the items in the foot menu in gnome. How do I
accomplish this.
This can be accomplished like so
GtkWidget *menuitem;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *pixmap;
menuitem = gtk_menu_item_new();
hbox = gtk_hbox_new(FALSE, 5);
label = gtk_label_new("menu item");
pixmap = gtk_pixmap_new(some_gdkpixmap,some_gdkbitmap);
gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(menuitem), hbox);
gtk_menu_append(GTK_MENU(somemenu), menuitem);
Also, can I change the orientation of the menu. Eg, instead of
expanding down (as with most program menus), expand up (as with gnome
foot, and windows start button).
I dont know about this, but I suppose it can be done using some position
function or something, I could be wrong, check gtkmenu.h
Maher
thanks,
-Kervin
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
muhri muhri net -- http://www.muhri.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]