... I provide a stock_id but I don't need a accel group
so I pass None. Is there a way to set and change the label next to the
image?
Hmm, I think it will use the label of the stock_id. You can add your custom stock items with your custom labels and images, and then use it:
http://www.pygtk.org/pygtk2reference/gtk-stock-items.html#function-gtk--stock-add
I generally create MenuItems with actions:
http://www.pygtk.org/pygtk2reference/class-gtkaction.html#method-gtkaction--create-menu-item
This way, I dont have to care about how it creates the image, label and accels. And more, I can create other types like toolitems and buttons.
But if you really want to access the label, I think that after you create the ImageMenuItem, as it is a GtkBin, you just have to find a label children inside the Box child (only child of the item). If that is annoying, create an utility function :)
[Eric Jardim]
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
