wxRuby basic app


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.