|
-
Feb 11th, 2005, 10:55 AM
#1
Thread Starter
New Member
Stop user from browsing above a certain folder in DirListBox
Hi,
We have a DirListBox control in our project.
Double clicking on a directory or folder will refresh the control with the contents of that folder. (Exactly like browsing the Windows
Explorer).
We want to stop the user from browsing above a certain level.
For example, the current folder is D:\Experiments\2000 where "2000" is the folder corresponding to the current experiment that the user
has opened.
The "Experiments" folder contains folders one for each experiment.So it contains folders like "2000","3000", "8000", "9000" etc.
We want the user to stop browsng the Experiments folder which is like the parent of all sub folders. The user should be able to browse
only the current experiment folder and all its sub folders.
Is there a way of stopping the user at a certain level in the DirListBox?
-
Feb 11th, 2005, 11:15 AM
#2
Re: Stop user from browsing above a certain folder in DirListBox
You just need to re-set the path to your "fixed" path (in the Change event of the DirListbox) if they try to go elsewhere.
You will probably want to use a variable to store the path, which you can then compare to the left part of Dir.Path.
-
Feb 11th, 2005, 01:24 PM
#3
Thread Starter
New Member
Re: Stop user from browsing above a certain folder in DirListBox
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|