Page 1 of 1

Preventing the directory from changing

PostPosted: Mon Jun 10, 2013 11:19 am
by shx
Can someone help?

I have the tree portion of the fm file browser turned off.

I am showing the files and folders in a particular directory..

I do not want to allow the use to open a folder and drill down into the folder. How can I prevent this from happening.

I know I could do the DirectoryChanged subroutine to change it back to what it was but the user sees the window changing back and forth , not so nice.

I am sure there must be a way of disabling the click so that the folder should not open and the directory should not change..

Thanks

Re: Preventing the directory from changing

PostPosted: Tue Jun 11, 2013 10:26 am
by Neosoft Support
You can remove folders and show only files by setting the ViewConents property to "FilesOnly". For example:

fmSetFileBrowserProperties "FileList1" "ViewContents=FilesOnly;ShowTree=No"

If you want to show folders, but not allow the user to navigate below a certain point, you can use the fmSetRootDir action.

Re: Preventing the directory from changing

PostPosted: Tue Jun 11, 2013 12:33 pm
by shx
If you want to show folders, but not allow the user to navigate below a certain point

This is what I want
you can use the fmSetRootDir action

This will stop the user from navigating to a parent folder, I am looking for something that will not allow the double click to drill down into a folder.

there is a subroutine that captures the double click but it only works when click on a file not a folder

Re: Preventing the directory from changing

PostPosted: Tue Jun 11, 2013 4:56 pm
by Neosoft Support
The only way to prevent someone from opening a sub folder (other than the DirectoryChanged subroutine) is to not show them using the ViewContents=FilesOnly option.