[Ironruby-core] FileDialog in a IronRuby App.

Shay Friedman shay.friedman at gmail.com
Tue Jul 27 12:47:49 EDT 2010


require 'System.Windows.Forms'
include System::Windows::Forms

diag = OpenFileDialog.new
res = diag.show_dialog
if res == DialogResult.OK then
  diag.file_names.each { |f| puts "You selected #{f}" }
end

Shay.
--------------------------------------------------------
Shay Friedman | Microsoft Visual C#/IronRuby MVP | Author of IronRuby
Unleashed
Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay


On Tue, Jul 27, 2010 at 6:31 PM, Eduardo Blumenfeld <lists at ruby-forum.com>wrote:

> Hi all,
>
> How can I call the filedialog window from an IronRuby program, getting
> the list of files selected in the dialog in a String or Array variable?
>
> Thank you in advance...
>
> Eduardo Blumenfeld
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100727/65879c4e/attachment-0001.html>


More information about the Ironruby-core mailing list