We Recommend

Beginning Ruby: From Novice to Professional Beginning Ruby: From Novice to Professional
Beginning Ruby is a thoroughly contemporary guide for every type of reader wanting to learn Ruby, from novice programmers to web developers to Ruby newcomers. It starts by explaining the principles behind object-oriented programming and within a few chapters builds toward creating a genuine Ruby application.


Posted By

dbug13 on 04/14/08


Tagged

ruby wxruby


Versions (?)


wxRuby basic app


Published in: Ruby 


  1. #!/usr/bin/env ruby
  2. require 'rubygems'
  3. require 'wx'
  4.  
  5. include Wx
  6.  
  7. class MainFrame < Frame
  8. def initialize(title)
  9. super(nil,-1, title)
  10. end
  11. end
  12.  
  13. class MainApp < App
  14. def on_init
  15. frame = MainFrame.new("Test App")
  16. frame.show()
  17. end
  18. end
  19.  
  20. MainApp.new.main_loop

Report this snippet 

You need to login to post a comment.