Sha256: 6d1f92120b10f94cde88f97208e54bfea3839263d0dfa1d57b7e3df5ea2399df

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 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|SPAM files (*.spam)|*.spam|Egg file (*.egg)|*.egg|All Files (*.*)|*.*"

module Demo
    def Demo.run(frame, nb, log)
        log.write_text("CWD: " + Dir.getwd())
        dlg = Wx::FileDialog.new(frame, "Save file as...", Dir.getwd(), "", $wildcard, Wx::SAVE)
        dlg.set_filter_index(2)
        if dlg.show_modal() == Wx::ID_OK
            path = dlg.get_path()
            log.write_text("You selected " + path)
        log.write_text("CWD: " + Dir.getwd())
        end
    end
    
    def Demo.overview
        return "Welcome to the wxRuby FileDialog_Save 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

12 entries across 12 versions & 2 rubygems

Version Path
wxruby64-2.0.1-x64-mingw32 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-2.0.1-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.7-i386-mswin32 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.10-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.6-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.6-x86-mingw32 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.7-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.8-x86-mingw32 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.8-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.9-x86-mingw32 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-1.9.9-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw
wxruby-2.0.0-x86-mswin32-60 samples/bigdemo/wxFileDialog_Save.rbw