MenuBar doesn't show

Hi all,

I am totally new to Ruby and Wx so i’d appreciate it if someone could
tell me why my menubar doesn’t show

Here is the code (running on Vista…):

class MinimalApp < App
def on_init
@frame = Frame.new(nil, -1, “Lister”)
@frame.set_client_size(600,400)

  @sizer = BoxSizer.new(VERTICAL)

  @menubar = MenuBar.new

  @file = Menu.new
  @open = @file.append("Open", "open")
  @menubar.append(@file, "File")

  @sizer.add(@menubar, 0, GROW|ALL, 2)

  @frame.set_sizer(@sizer)

  @frame.show
end

end

Thanks

class MinimalApp < App
def on_init
@frame = Frame.new(nil, -1, “Lister”)
@frame.set_client_size(600,400)

  @sizer = BoxSizer.new(VERTICAL)

  @menubar = MenuBar.new

  @file = Menu.new
  @open = @file.append("Open", "open")
  @menubar.append(@file, "File")

  @sizer.add(@menubar, 0, GROW|ALL, 2)

  @frame.set_sizer(@sizer)

  @frame.show
end

end

Well,I’ve not tryed the syntaxis but, apparently you need: to use
set_menu_bar(@menubar).

Maybe a @frame.set_menu_bar(@menubar) would do the job.

Omar H. a écrit :

  @open = @file.append("Open", "open")

Well,I’ve not tryed the syntaxis but, apparently you need: to use
set_menu_bar(@menubar).

Maybe a @frame.set_menu_bar(@menubar) would do the job.

Yes it does the job, thanks.