Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Select Folder Dialog


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Apr 14, 2015 4:16 PM Last Post By: Martin Masci
Martin Masci

Posts: 29
Registered: 4/3/04
Select Folder Dialog  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2015 1:50 PM
I need of select folder dialog but I must limit the folders to select.
For example I want that user select a subfolder of "c:\myfolder\" or a subfolder of "\\server\myfolder\" (shared path), so the select folder dialog must don't allow to select a different path.

Is it possible?

How?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Select Folder Dialog  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2015 2:09 PM   in response to: Martin Masci in response to: Martin Masci
Martin wrote:

Is it possible?

Yes. Use the overloaded version of the VCL's SelectDirectory() function
that has a Root parameter, eg:

uses
  ..., FileCtrl;
 
var
  Folder: string;
begin
  if SelectDirectory('Select a folder:', 'c:\myfolder\', Folder) then
  begin
    // use Folder as needed...
  end;
end;


--
Remy Lebeau (TeamB)
Martin Masci

Posts: 29
Registered: 4/3/04
Re: Select Folder Dialog  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2015 4:16 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Martin wrote:

Is it possible?

Yes. Use the overloaded version of the VCL's SelectDirectory() function
that has a Root parameter, eg:

uses
  ..., FileCtrl;
 
var
  Folder: string;
begin
  if SelectDirectory('Select a folder:', 'c:\myfolder\', Folder) then
  begin
    // use Folder as needed...
  end;
end;


--
Remy Lebeau (TeamB)

Thanks
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02