Posted on 2012-09-06
I'd like to be able to select a file from an existing directory, so I set the OpenDialog's InitialDir to that known to exist directory. Subsequently, when the OpenDialog method is executed, how can I prevent users from browsing to other drives and directories?
I've set the option 'ofNoChangeDir' to true which apparently does not function.
OpenDialog2.InitialDir := DesiredDir; // I want users tied to this directory
OpenDialog2.Filter := 'Text files|*.txt|';
if OpenDialog2.Execute then
FileNameSelected.text := openDialog2.Files;
TIA - Ed