Method: Tk::Root#add_menu

Defined in:
lib/tk/root.rb

#add_menu(menu_info, tearoff = false, opts = nil) ⇒ Object



72
73
74
75
76
77
78
79
80
81
# File 'lib/tk/root.rb', line 72

def add_menu(menu_info, tearoff=false, opts=nil)
  # See tk/menuspec.rb for menu_info.
  # opts is a hash of default configs for all of cascade menus.
  # Configs of menu_info can override it.
  if tearoff.kind_of?(Hash)
    opts = tearoff
    tearoff = false
  end
  _create_menubutton(self, menu_info, tearoff, opts)
end