ruby-****@sourc*****
ruby-****@sourc*****
2012年 10月 30日 (火) 21:56:19 JST
------------------------- REMOTE_ADDR = 74.14.158.59 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-mnui ------------------------- @@ -10,7 +10,11 @@ Submenus in GTK+ are not created by separate type of menu item widget but by calling Gtk::MenuItem#submenu= method. This method calls Gtk::Menu#attach_to_widget to attach the submenu to the menu item and places an arrow beside the menu item to show that it now has a submenu. If the menu item already has a submenu, it will be replaced with the given Gtk::Menu widget. +{{image_right("mechanics-of-building-submenus.png")}} + For instance if we wish to create a menu with two items, of which the second item will have a submenu which in turn will have three final or leaf menu items, the following is the code, that shows the mechanics of creating such a menu hierarchy: + +{{br}} ## See: menuitems-n-submenus-mechanics.rb