Sha256: fca965acbd0acd95280f2278c8f007fa01b02c707af031ffbe8602ad3383e960

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 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

4 entries across 4 versions & 1 rubygems

Version Path
wxruby-1.9.5-i386-mswin32 samples/bigdemo/wxColourDialog.rbw
wxruby-1.9.4-i386-mswin32 samples/bigdemo/wxColourDialog.rbw
wxruby-1.9.2-i386-mswin32 samples/bigdemo/wxColourDialog.rbw
wxruby-1.9.1-i386-mswin32 samples/bigdemo/wxColourDialog.rbw