Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Tk:getOpenFile for selecting directories/folders

by rbc (Curate)
on Mar 18, 2002 at 21:32 UTC ( [id://152586]=perlquestion: print w/replies, xml ) Need Help??

rbc has asked for the wisdom of the Perl Monks concerning the following question:

Oh wise Monks,

I really like use Tk::getOpenFile and Tk::getSaveFile
to allow the user to specify files to load or save things
as. But I can not seem to figure out how to use these
these subs to allow the user to select a directory.

I have tried things like so ...
my $userSelectedFile = $top->getOpenFile( -defaultextension => "", -filetypes => [ ['Directories', '.dir'], ['Dirs', '.'], ['Folders', ''], ['All Files', '*'] ], -initialdir => "C:\\TEMP", -title => "Select file 1" );
... but no luck :(

Replies are listed 'Best First'.
Re: Tk:getOpenFile for selecting directories/folders
by Moonie (Friar) on Mar 19, 2002 at 00:49 UTC
    You may want to check out this link, also if you're working on a Win32 Platform - you may want to use Win32::FileOp and use the BrowseforFolder() function.

    - Moon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://152586]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found