Sha256: 3b37b72f14637d25022f6b6ca469066df11ca9e9f0a2509a5530938f7328ba4b

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/env ruby
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
# Freely reusable code: see SAMPLES-LICENSE.TXT for details
begin
  require 'rubygems' 
rescue LoadError
end
require 'wx'



$wildcard = "Ruby Source (*.rb)|*.rb|RubyW Source (*.rbw)|*.rbw|All files (*.*)|*.*"

module Demo
    def Demo.run(frame, nb, log)
        log.write_text("CWD: " + Dir.getwd + "\n")
        dlg = Wx::FileDialog.new(frame, "Choose a file", Dir.getwd, "", $wildcard, Wx::FD_OPEN | Wx::FD_MULTIPLE)
        if dlg.show_modal == Wx::ID_OK
            paths = dlg.get_paths
            log.write_text("You selected %d files" % + paths.length)
            paths.each {|path| log.write_text("CWD: " +  path)}
        log.write_text("CWD: " + Dir.getwd)
        end
    end
    
    def Demo.overview
        return "Welcome to the wxFileDialog 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

14 entries across 14 versions & 1 rubygems

Version Path
wxruby3-0.9.2-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.1-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.rc.3-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.rc.2-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.rc.1-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.14-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.13-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.11-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.10-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.9-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.8-x64-mingw-ucrt samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.2-x64-mingw-ucrt-3.2-3.2.2 samples/bigdemo/wxFileDialog.rbw
wxruby3-0.9.0.pre.beta.1-x64-mingw-ucrt-3.2 samples/bigdemo/wxFileDialog.rbw