Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks again, you guys have been a great help today!#!/c:/perl use Win32; use Win32::Process; use Tk; use Tk::HList; use Tk::Notebook; use vars qw($int $entry); &init_ui(); MainLoop; sub init_ui { my $mw = MainWindow->new; $mw->title("File Converter"); # menu bar (top) my $menu = $mw->Frame( -borderwidth => '2', -relief => 'groove' )->pack(-side => 'top', -anchor => 'n', -expand => 1, -fill => + 'x'); $menu->Menubutton( -text => "File", -menuitems => [ ['command' => "Open", -command => sub { fileDi +alog()}] ] )->pack(-side =>'left'); sub filebox { my $f = $mw->Frame; my $but = $f->Button(-text => "Browse ...", -command => sub { fileDialog()}); $but->pack(-side => 'left'); $f->pack(-fill => 'x', -padx => '1c', -pady => 3); } sub fileDialog { my $types; my $file; @types = (["MP3 Files", '.mp3'], ["All files", '*'] ); $file = $mw->getOpenFile(-filetypes => \@types); print "FILE: $file\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get Multiple files with TK
by smackdab (Pilgrim) on Mar 30, 2002 at 02:43 UTC |