Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2007
    Posts
    160

    Folder Browse Dialog Question

    I just added the Folder Browse dialog so that a user can pick a destination folder for a third party application, which will be passed into a command line. All seems to work fine, but I have a question...

    Is there any way to disable the Make New Folder and Cancel buttons? Also, would there be any way to change the displayed dialog title? Currently, it simply displays as 'Browse for Folder'.

    Any help appreciated!

    Thanks!

  2. #2
    Join Date
    Jan 2007
    Posts
    160
    Can I do something with the butons with code? I saw something in another post similar to this...

    if avdir == "CANCEL" then
    do something and maybe end the application
    else
    possibly display message of selected location for verification
    end

  3. #3
    Join Date
    Jan 2007
    Posts
    160
    Also, how can I loop, if possible at all, until selected destination is verified as OK. For example if they enter a path and they indicate this is not correct, how can I loop to display the folder browse dialog again?

    Same for if Cancel is selected - how can I loop back to the browse dialog if the user indicates they do not truly wish to cancel?

  4. #4
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    Quote Originally Posted by NitLions View Post
    Also, how can I loop, if possible at all, until selected destination is verified as OK. For example if they enter a path and they indicate this is not correct, how can I loop to display the folder browse dialog again?

    Same for if Cancel is selected - how can I loop back to the browse dialog if the user indicates they do not truly wish to cancel?
    Here is some code I put together to do just that. I put this code on my 'Browse' button.

    Code:
    bCSelected = 1;
    while bCSelected == 1 do
    	sBackupFolder = Dialog.FolderBrowse("Please select a backup folder:", _DesktopFolder);
    	if sBackupFolder ~= "CANCEL" then
    		sDriveLetter = String.Left(sBackupFolder, 2);
    		if sDriveLetter ~= "C:" then
    			Input.SetText("O_InputFolder", sBackupFolder);
    			bCSelected = 0;
    		else
    			Dialog.Message("Invalid Configuration", "You cannot select the source drive as the backup drive.\r\n\nPlease select another location.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    			bCSelected = 1;
    		end
    	else
    		bCSelected = 0;
    	end
    end
    You can make some simple modifications here to disallow the CANCEL button as well.

  5. #5
    Join Date
    Jan 2007
    Posts
    160
    If I present a Yes No dialog to confirm cancel and or confirm selected destination location, what condition do I use?

    If result == "YES" or "NO" ?

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    if result == IDYES

    or

    if result == IDNO

  7. #7
    Join Date
    Jan 2007
    Posts
    160
    I looked in the help for the dialog 'stuff' and found that I could use If result == 6 for yes. That should work, right?

  8. #8
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Yep, using the IDYES/IDNO is just a little more visual when you're reading through your code. A little easier to see what you are checking for is all.

  9. #9
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    Quote Originally Posted by NitLions View Post
    I looked in the help for the dialog 'stuff' and found that I could use If result == 6 for yes. That should work, right?
    Yep that will work as well.

  10. #10
    Join Date
    Jan 2007
    Posts
    160
    Ah, got it!

    Thanks All!!

Similar Threads

  1. Shell.GetFolder Sub folder question
    By StealthFD in forum AutoPlay Media Studio 6.0
    Replies: 13
    Last Post: 11-30-2005, 09:04 AM
  2. cookies
    By goukilord10 in forum AutoPlay Media Studio 5.0
    Replies: 6
    Last Post: 05-20-2005, 04:08 PM
  3. How do i Stop the browse folder dialog ?
    By lyndonboyd in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 11-15-2003, 02:20 PM
  4. INFO: The Explore Button on the Distribution Folder Dialog
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-11-2002, 12:06 PM
  5. Possible to display alternate list in Shortcut Folder dialog?
    By Jak Fearon in forum Setup Factory 5.0
    Replies: 5
    Last Post: 09-07-2001, 05:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts