|
class gtk.ImageMenuItem(gtk.MenuItem): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Item +-- gtk.MenuItem +-- gtk.ImageMenuItem
|
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.
gtk.ImageMenuItem(stock_id
=None, accel_group
=None)
| the stock icon ID or None if
no image is needed |
| 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
.
def set_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
.
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
().
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.