I would like to add a dialog box which allows the user to set the installation folder for their 'user data' as distinct from the Installation folder where the app itself resides.
This would default to $TARGETDIR$/Home. A varaiation on the Installation folder dialog would be perfect and I have adapted this with the Dialog Editore but I cannot see a way to change the default setting for the Folder browse control from 'Installation folder' to, in my case , $TARGETDIR$/Home
Ian
BrowseFolder control for non-installation folder
The best way to do this is:
Hope that helps!
- 1) Backup the TARGETDIR variable
2) Set the TARGETDIR variable to your desired default location for the user folder
3) Show the destination dialog again - the one that is already hooked up for TARGETDIR. I suggest you save the destination dialog under a new name, add it to your project, and then make the necessary textual-only changes on the dialog, so users know its a different directory they are choosing. But leave the dialog logic intact.
4) When the dialog returns, write the value of the TARGETDIR variable in a new variable that actually stands for the alternate folder. And restore the real value of the TARGETDIR variable.
Hope that helps!
The reason for this trickery is to make sure that when you choose a folder visually or with the browse button, the text field keeps in sync, and vice versa. Unfortunately at the moment the tree view and text fields are kept in sync only if both are bound to TARGETDIR...hence the trickery.
Thanks for your compliments - please help spread the word!
Thanks for your compliments - please help spread the word!
Who is online
Users browsing this forum: No registered users and 73 guests