[pygtk] Simple question on reusing stock item

John Finlay finlay at moeraki.com
Mon Feb 9 19:04:24 WST 2009


Alessandro Dentella wrote:
> Hi,
>
>   i'd like to use stock item in menu entries with modified labels to better
>   suit context.
>
>   *  MenuItem doesn't allow to use images (reasonable)
>   *  ImageMenuItem doesn't appearently allow to change label (really???)
>
>   I think I could go with IconFactory but it seems to me it's more complex
>   than what is should be and I wandered if there is a simple way I was not
>   able to work out.
>
>   Thanks
>   
>   sandro
>   *:-)
>
>   
A MenuItem is a Container so you can add anything to it. In your case 
create an empty MenuItem and add an HBox containing an Image and a Label.

John


More information about the pygtk mailing list