I am using rvActionInsertFile and rvActionExport and want to set the initial directory for the open and save operations.
I attempt to set the initialdir property but I get a compile time error telling me that "property 'InitialDir' inaccessible here'
I am attempting to set these properties in the formcreate method.
Where and how do I set the initialdir property for both these actions?
Thanks in advance
Set the initial Directory for open and save
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If I could, follow up with another question.
I set the initial directory with:
rvActionInsertFile1.initialdir := GetSpecialFolderPath(CSIDL_PERSONAL);
This is executed once in the formcreate method.
Also, GetSpecialFolderPath is a function I declare and seems to work fine for all my other savedialogs in my application.
My new problem is if I navigate away from the path set up as above, any subsequent time I reexecute the action, the dialog opens up in the last directory I was in, not the initial directory I have set. Even if I close the form and reopen, it still opens in the last directory, and even when I terminate the application and relaunch, it goes back to the last directory, rather than the initialdir? Nothing I do seems to reset the initial directory other than navigating to a new directory and open or export a document.
How do I ensure that every time this action is executed, it opens up in initialdir ?
I set the initial directory with:
rvActionInsertFile1.initialdir := GetSpecialFolderPath(CSIDL_PERSONAL);
This is executed once in the formcreate method.
Also, GetSpecialFolderPath is a function I declare and seems to work fine for all my other savedialogs in my application.
My new problem is if I navigate away from the path set up as above, any subsequent time I reexecute the action, the dialog opens up in the last directory I was in, not the initial directory I have set. Even if I close the form and reopen, it still opens in the last directory, and even when I terminate the application and relaunch, it goes back to the last directory, rather than the initialdir? Nothing I do seems to reset the initial directory other than navigating to a new directory and open or export a document.
How do I ensure that every time this action is executed, it opens up in initialdir ?