Hello All,
I use AskPath() to get a path from the user. The problem of using AskPath() is that there is no button to create a new folder. The browse button in any of the dialogs leads me to a dialog which does not have the "new folder" icon or button.
Is there any dialog that contains a button to create a new folder? Is there any way I can do it?
Thanks,
Vishwa
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

"New Folder" button
Started by
vishwa
, Oct 01 2004 21:45
2 replies to this topic
Posted 06 October 2004 - 22:19
You need to validate the path that the user typed in.
Then display AskYesNo(svMsg,YES). If the user answers YES, you create the path using CreateDir ( TARGETDIR );
Then display AskYesNo(svMsg,YES). If the user answers YES, you create the path using CreateDir ( TARGETDIR );
CODE |
again: // Used if an invalid TARGETDIR is input nResult = AskPath ( "" , "" , TARGETDIR ); // Display dialog here if nResult = BACK then goto skip; endif; // Filter the input TARGETDIR for valid characters and valid path if TARGETDIR = "" then // entered a blank MessageBox( "You entered a blank entry for the path.\n\n Try another path." , INFORMATION ); goto again; elseif (ExistsDir ( TARGETDIR ) < 0 ) then // Check for valid path nResult = AskYesNo("Path does not exists.\n\nDo you want to create this path? \n\n" + TARGETDIR , YES); if nResult = YES then CreateDir ( TARGETDIR ); else goto again: endif; endif; skip: return nResult; |
Posted 07 October 2004 - 15:03
Thank you very much for your reply. Though this allows the user to enter a new path, and solves my problem, I actually wanted to know if there was a way to have a "New folder" button in the Browse dialog. All the dialogs that have a Browse button, pop up a dialog that allows us to select only a folder that exists. It does not give us an option to create a new folder. I was wondering if it is possible to obtain that.
Thanks,
Vishwa