Displaying 1 result from an estimated 1 matches for "menu_foo".
2004 Aug 25
7
problem subclassing Wx::Menu
...mands[ident], false ) }
end
end
class MyFrame < Wx::Frame
def initialize(title, x, y, w, h)
super(nil, -1, title, Wx::Point.new(x, y), Wx::Size.new(w, h))
end
end
class MyApp < Wx::App
def on_init()
frame = MyFrame.new(''EasyMenu'', 50, 50, 400, 200)
# @menu_foo = Wx::Menu.new()
# @menu_foo.append(999, "&Qux\tCtrl-Q")
# frame.evt_menu(999) { | e | p "QUX" }
@menu_foo = EasyMenu.new(frame)
@menu_foo.add_menu_item("&Qux", "Ctrl-Q") { | e | p "QUX" }
menu_bar = Wx::MenuBar.new()...