Erik,

This is a obvious solution and I have used for years - until I heard about the 
BrowseFolder API.

The only thing you need to be aware of with this solution using the FileSaveAsDlg() 
function is that it will not let you select a folder where you don't have write 
access. So if you need the user to pick a folder on a cdrom, this function will not 
work as it tells you that you don't have write access in the selected folder :-/

In all cases it's as good as any other solution

Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-----Original Message-----
From: Nielsen, Erik R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 11:37 AM
To: 'Mike Tonge'; [EMAIL PROTECTED]
Subject: RE: MI-L MapBasic - Open Folder Dialog


Mike,
There's a method in MapBasic, but it's as clunky as h3��.

Here's an example:

Sub Settings
 Print Chr$(12)
 Print "Settings"
 Dialog 
   Title "NetEditor Settings" 
   Control Button
     Title "Set Styles.."
     Calling ColorSettings
   Control StaticText
     Title "Select the output directory"
   Control Button
     Title "Browse.."
     Calling DirHandler
   Control StaticText
     Title gsDefaultPath
     ID 1
   Control Button
     Title "Save Settings"
     Calling WriteIni
   Control CancelButton
     Title "Default Settings"
     Calling DefaultSettings
   Control OKButton
End Sub


Sub DirHandler
  gsDefaultPath = PathToDirectory$( FileSaveAsDlg(gsDefaultPath,"This.Dir","*","Select 
a directory and click
Save!"))
  Print gsDefaultPath
  if gsDefaultPath = "" Then 
    Note "You must specify a directory"
  Else
    Alter Control 1
      Title gsDefaultPath
    Alter Control 1
      Hide
    Alter Control 1
      Show
  End if
End Sub

I didn't post this as I didn't see you were from Atkins and I didn't want to expose 
how shoddy I work. Cheers Erik



-----Original Message-----
From: Mike Tonge [mailto:[EMAIL PROTECTED] 
Sent: 22 September 2004 14:16
To: [EMAIL PROTECTED]
Subject: MI-L MapBasic - Open Folder Dialog


Is there any way to select a folder in the same way as the fileopendlg function works. 
 ie.  Without having to code a seperate dialog window.
 
Mike Tonge
Atkins

                
---------------------------------
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  

This message has been scanned for viruses by MailControl - (see
http://bluepages.wsatkins.co.uk/?4318150)


This email and any attached files are confidential and copyright protected. If you are 
not the addressee, any dissemination of this communication is strictly prohibited. 
Unless otherwise expressly agreed in writing, nothing stated in this communication 
shall be legally binding.



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, 
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13474



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13476

Reply via email to