By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,190 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,190 IT Pros & Developers. It's quick & easy.

Perl/TK - Browse Folder Dialog

P: 5
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.
Jul 13 '07 #1
Share this Question
Share on Google+
7 Replies


KevinADC
Expert 2.5K+
P: 4,059
Are you using Tk? There must be a widget for opening the browse folder/files dialog box.
Jul 13 '07 #2

P: 5
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.
Jul 16 '07 #3

KevinADC
Expert 2.5K+
P: 4,059
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.
Jul 16 '07 #4

P: 5
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.
Jul 17 '07 #5

miller
Expert 100+
P: 1,089
Just use CPAN.

cpan Perl/TK

- Miller
Jul 17 '07 #6

KevinADC
Expert 2.5K+
P: 4,059
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.
Jul 17 '07 #7

P: 5
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.
Jul 17 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.