DaniWeb IT Discussion Community

Code Snippets (http://www.daniweb.com/code/)
-   ruby (http://www.daniweb.com/code/ruby.html)
-   -   Using FXRuby basic window (http://www.daniweb.com/code/snippet157.html)

Dark_Omen ruby syntax
Jan 20th, 2005
This is a basic window coded in Ruby. To download Ruby go to www.ruby-lang.org and download the latest version. The latest version includes the FX toolkit that is needed to create this window.

  1. require 'fox'
  2. include Fox
  3.  
  4. theApp = FXApp.new
  5.  
  6. theMainWindow = FXMainWindow.new(theApp, "Hello, World")
  7. theApp.create
  8.  
  9. theMainWindow.show
  10.  
  11. theApp.run