开发者

How to display an icon in a menu item?

开发者 https://www.devze.com 2023-01-27 22:00 出处:网络
I know how to create a plain text menu item: 开发者_Go百科item = gtk.MenuItem(\'text\') but how can I display an icon?

I know how to create a plain text menu item:

开发者_Go百科item = gtk.MenuItem('text')

but how can I display an icon?

Like this:

How to display an icon in a menu item?


Simply use ImageMenuItem instead of MenuItem.

Here's an example: http://zetcode.com/tutorials/pygtktutorial/menus/

0

精彩评论

暂无评论...
验证码 换一张
取 消