As far as creating a tree with pixmap in the node - take a look at gtkctree.h -
its quite explanitory.. As for creating a menuitem with a pixmap - since the
menuitem is a container widget I'd do something like this
GtkWidget *menuitem;
GtkWidget *pixmap;
GtkWidget *label;
GtkWidget *hbox;
menuitem = gtk_menu_item_new(); /* this is a container widget */
pixmap = gtk_pixmap_new(gdkpixmap,gdkmask); /* assuming u created those already
*/
label = gtk_label_new("My Menu Item");
hbox = gtk_hbox_new(0,5);
gtk_hbox_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 0);
gtk_hbox_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(menuitem), hbox);
gtk_widget_show_all(menuitem);
voila..
Similar code can be found in SkipStone, http://www.muhri.net/skipstone
CTree code can be found in Pronto! but its in Gtk::Perl - however u can figure
out the equivlant c code, http://www.muhri.net/pronto
Maher
On Sat, 14 Apr 2001 05:48:57 -0400 (EDT), Hosam Al-Moqim said:
> Hi ,,,
> how i can creat tree with pixmap and label ( the item and root ), and change
> the pixmap dynmically when selecte one , also how i can put pixmap with menu
> item ? any code ?
>
> Regards
> Hussam Moqhim
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
--
http://www.muhri.net -- [EMAIL PROTECTED]
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list