Method: Tk::Toplevel#add_menubar

Defined in:
ext/lib/tk/toplevel.rb

#add_menubar(menu_spec, tearoff = false, opts = nil) ⇒ Object



212
213
214
215
216
217
218
# File 'ext/lib/tk/toplevel.rb', line 212

def add_menubar(menu_spec, tearoff=false, opts=nil)
  # See tk/menuspec.rb for menu_spec.
  # opts is a hash of default configs for all of cascade menus.
  # Configs of menu_spec can override it. 
  menu_spec.each{|info| add_menu(info, tearoff, opts)}
  self.menu
end