ruby-****@sourc*****
ruby-****@sourc*****
2012年 11月 7日 (水) 03:25:32 JST
------------------------- REMOTE_ADDR = 184.145.95.170 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-mnub ------------------------- @@ -169,7 +169,9 @@ help.submenu = helpmenu -Since all menus are derived from Gtk::MenuShell abstract class, we assigning menu items to sub-menus, using Gtk::MenuShell#append(child). Note that we use the this instance method on both menu bar objects as well as on menus i.e. sub-menus. We also have Gtk::MenuShell#prepend or Gtk::MenuShell#insert at our disposal. +{{br}} + +Since all menus are derived from Gtk::MenuShell abstract class, we assigning menu items to sub-menus, using Gtk::MenuShell#append(child). Note that we use the this instance method on both menu bar objects as well as on menus i.e. sub-menus, e.g.:((*'menubar.append(file)'*)) and((*'filemenu.append(new)'.*))We also have Gtk::MenuShell#prepend or Gtk::MenuShell#insert at our disposal. It is much easier to comprehend these concepts by looking at the code, so review the example program above to observe the relationships between these widgets.