Sha256: 2712a2823b32aa13bc417d62baa930d0f62e911ad4d3dd25f2c1f9e4f7a51556
Contents?: true
Size: 764 Bytes
Versions: 20
Compression:
Stored size: 764 Bytes
Contents
#!/usr/bin/env ruby begin require 'wx' rescue LoadError => no_wx_err begin require 'rubygems' require 'wx' rescue LoadError raise no_wx_err end end module Demo def Demo.run(frame, nb, log) dlg = Wx::ColourDialog.new(frame) dlg.get_colour_data().set_choose_full(true) if dlg.show_modal() == Wx::ID_OK data = dlg.get_colour_data().get_colour() log.write_text("You selected: (%d, %d, %d)" % [data.red, data.green, data.blue]) end dlg.destroy() end def Demo.overview return "Welcome to the wxRuby ColourDialog demo" end end if __FILE__ == $0 run_solo_lib = File.join( File.dirname(__FILE__), 'run.rb') load run_solo_lib run File.basename($0) end
Version data entries
20 entries across 20 versions & 1 rubygems