develooper Front page | perl.beginners | Postings from April 2002

Directory Dialog Box

Mayank Ahuja
April 3, 2002 00:42
Directory Dialog Box
Message ID:
Hi Group!

This is related to perl/tk (basically PERL with Tk module).

In my application i need to give a browse button. When the user clicks
on this button, another window pops up and shows him the directory
structure. The user either selects a directory (which can be any levels
below the top level directory) or enters the path in the text box.
If the path in the text box doesn't exist it warns the user that the
path doesn't exist and asks for permission to create the same else it
simply returns the complete path of the directory selected.

I have tried with:


and able to achieve the purpose BUT the problem is Tk::FileSelect is for
selecting Files, so the user will see the files in the directory also
(which i don't want the user to see).

Purpose of the above activity: 
When the user wants to install something, he invokes my application
which will ask it to give the path where he/she would like to install
the tool. I want to provide an aid to the user by giving him a Browse
button and select the directory where he wants to install. If he wants
to create a new directory, then he enters the path in the text box in
the same GUI and my application creates the same after warning the user.
(Or like windows, the new folder/directory can be created by pressing a

I strongly feel there must be an existing module for it. Can somebody
please help me?


"The difference between ordinary and extraordinary is that little extra"
		                                                  -Anon Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About