Créer  Editer  FrontPage  Index  Chercher  Changements  History  RSS  Login


class Gtk::ImageMenuItem

A Gtk::ImageMenuItem is a menu item which has an icon next to the text label. Note that the user can disable display of menu icons, so make sure to still fill in the text label.

Class Methods = nil, use_underline = true)
Creates a new Gtk::ImageMenuItem.
  • label: the string to use for the label.
  • use_undeline: true if underscores in label indicate the mnemonic for the menu item.
  • Returns : a new Gtk::ImageMenuItem., accel_group = nil)
Creates a new Gtk::ImageMenuItem containing the image and text from a stock item(Gtk::Stock constants like Gtk::Stock::OK and Gtk::Stock::APPLY). If you want this menu item to have changeable accelerators, then pass in nil for accel_group. Next call Gtk::MenuItem#accel_path= with an appropriate path for the menu item, use Gtk::Stock.lookup to look up the standard accelerator for the stock item, and if one is found, call Gtk::AccepMap.add_entry? to register it.

Instance Methods

Gets the widget that is currently set as the image of image_menu_item. See Gtk::ImageMenuItem#image=.
  • Returns: the widget set as image of image_menu_item.
Sets the image of image_menu_item to the given widget.
  • image: a widget(Gtk::Widget) to set as the image for the menu item.
  • Returns: image.
Same as Gtk::ImageMenuItem#image=.
  • image: a widget(Gtk::Widget) to set as the image for the menu item.
  • Returns: self.


image: Gtk::Widget (Read/Write)
Child widget to appear next to the menu text

- Masao?

Dernière modification:2011/06/05 23:09:00
Mots clef:
Références:[Gtk::Action] [Gtk::ImageMenuItem]