gtk.ImageMenuItem

gtk.ImageMenuItem — a menuitem that displays an image with an accel label

Synopsis

class gtk.ImageMenuItem(gtk.MenuItem):
    gtk.ImageMenuItem(stock_id=None, accel_group=None)
def set_image(image)
def get_image()

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.Item
            +-- gtk.MenuItem
              +-- gtk.ImageMenuItem

gtk.ImageMenuItem Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

"image"Read-Writethe child widget that is next to the text in the menu item

gtk.ImageMenuItem Style Properties

gtk.Widget Style Properties

gtk.MenuItem Style Properties

gtk.ImageMenuItem Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.Item Signal Prototypes

gtk.MenuItem Signal Prototypes

Description

The gtk.ImageMenuItem widget is a subclass of gtk.MenuItem that contains an image widget and a gtk.AccelLabel though a gtk.ImageMenuItem can be created that has no image and an empty label.

Constructor

    gtk.ImageMenuItem(stock_id=None, accel_group=None)
stock_id :the stock icon ID or None if no image is needed
accel_group :the accel group to add the accel label mnemonic to
Returns :a new gtk.ImageMenuItem widget

Creates a new gtk.ImageMenuItem with a stock label and image specified by stock_id. If stock_id is not a stock item then the image will be the "broken image" and the label text will be the string in stock_id. The label text will be parsed for underscore characters to indicate the mnemonic character for the accelerator.

If stock_id specifies a stock item and accel_group specifies a gtk.AccelGroup the accelerator is added to accel_group.

Methods

gtk.ImageMenuItem.set_image

    def set_image(image)
image :a widget to set as the image for the menu item.

The set_image() method sets the image of the image menu item to the widget specified in image.

gtk.ImageMenuItem.get_image

    def get_image()
Returns :the image in the image menu item

The get_image() method gets the widget that is currently set as the image of image menu item. See set_image().