Hello wxruby-users,
Kevin, thanks for fast addition of the support of MDI and submenues!
I''ve tested it under WinXP and all works very well. There is a test
example at the end of the message.
--
Best regards,
Pavel
mailto:papushev@inp.nsk.su
#===============================================require
''wxruby''
include Wx
class MyFrame < MDIParentFrame
def initialize(title)
super( nil, -1, title )
@menuBar = MenuBar.new
@fileMenu = Menu.new
@menuBar.append(@fileMenu, ''File'')
@fileMenu.append(:mi_file_new.to_i, "New")
evt_menu(:mi_file_new.to_i){|a|
MDIChildFrame.new(self, -1, "MDI child")
}
#<< Test submenu
@submenu1 = Menu.new
@submenu1.append(1, "item 1")
@item_with_submenu1 = MenuItem.new(@fileMenu, 2, ''&Submenu
1'',
'''', ITEM_NORMAL,
@submenu1)
@fileMenu.append_item( @item_with_submenu1 )
#>>
set_menu_bar( @menuBar )
end
end
class RbApp < App
def on_init
frame = MyFrame.new("MDI parent")
frame.show(TRUE)
end
end
a = RbApp.new
a.main_loop
#================================================