#!/usr/bin/perl
use warnings;
use strict;
use Tk;
my @types =(
["All files", '*'],
["C files", [qw/.c++ .cpp .c/]],
["Log files", [qw/.log/]],,
["Text files", [qw/.txt/]],
);
my $mw = new MainWindow ( ) ;
my @files;
$mw -> Button ( -text => 'Select Files ' ,
-command => \&select_files
)-> pack(-padx=>5, -pady=>5) ;
MainLoop ( ) ;
sub select_files {
my $return_ref = $mw ->getOpenFile (
-initialdir => '.',
-filetypes => \@types,
-multiple => 1) ;
foreach my $file( @{$return_ref} ){
print "Result ", $file, "\n" ;
}
}
wxperl for multi-platform GUI coding in Perl and the utilities offered by Indigo Star for packaging things up.
Also have used Win32::GUI a couple years ago, it was easy for really simple things but wasn't what I was looking for. The wxperl mailing list also has good people responding to questions, I'd recommend it.
perlmonks.org content © perlmonks.org and Anonymous Monk, cbrandtbuffalo, Corion, mattr, zentara
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03