Connecting Tech Pros Worldwide Forums | Help | Site Map

Perl/TK - Browse Folder Dialog

Newbie
 
Join Date: Jul 2007
Posts: 5
#1: Jul 13 '07
I'm working to add a simple GUI form to an already existing perl script. The script simply takes a part number and an output path. It then connects to a client application and downloads data to the output directory. This part works great. However, to improve the ease of use I want to invoke the Windows Browse Folder Dialog for the user to select an output directory. (rather than having to open Explorer and copy the path into the text box on my GUI manually)

Is there any simple way to do this? The best example I could find on my own was FileOp off of CPAN, but that conteracted the portability I require for this program.

KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,091
#2: Jul 13 '07

re: Perl/TK - Browse Folder Dialog


Are you using Tk? There must be a widget for opening the browse folder/files dialog box.
Newbie
 
Join Date: Jul 2007
Posts: 5
#3: Jul 16 '07

re: Perl/TK - Browse Folder Dialog


Yes! Found it! You were right! There's a built in function. Apparently not many people know about this because it took me quite some time searching Google to find this one.
http://www.perltk.org/index.php?option=com_content&task=view&id=21&Itemi d=28
Tk has several built in file/directory handling dialogs.
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,091
#4: Jul 16 '07

re: Perl/TK - Browse Folder Dialog


All the Tk modules documentation should be on your local computer if you have activestate perl installed. It should also be available if you installed Tk manually.
Newbie
 
Join Date: Jul 2007
Posts: 5
#5: Jul 17 '07

re: Perl/TK - Browse Folder Dialog


Do you know where the documentation usually gets installed? This is on my work computer so I had nothing to do with the installation of either Tk or Perl. They were installed prior to my use of this computer.
miller's Avatar
Moderator
 
Join Date: Oct 2006
Location: San Francisco, CA
Posts: 830
#6: Jul 17 '07

re: Perl/TK - Browse Folder Dialog


Just use CPAN.

cpan Perl/TK

- Miller
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,091
#7: Jul 17 '07

re: Perl/TK - Browse Folder Dialog


Quote:

Originally Posted by rayken15

Do you know where the documentation usually gets installed? This is on my work computer so I had nothing to do with the installation of either Tk or Perl. They were installed prior to my use of this computer.

You would have to ask whoever is administering your system where the documentation is. Computer systems at work places can be setup so many different ways it's hard to say where it might be. If you have access to all files and folders look on the C: drive for an activestate or active perl folder.
Newbie
 
Join Date: Jul 2007
Posts: 5
#8: Jul 17 '07

re: Perl/TK - Browse Folder Dialog


I keep forgetting about CPAN. I'm used to using Visual Basic and other MS languages. Thanks for the suggestions. I'll also consider tracking down the administrator to find local documentation if I can't find what I need on CPAN.

Thanks,
Steve.
Reply