Solved

Open Direcctory Dialog - Does one exist?

Posted on 2004-08-29
7
157 Views
Last Modified: 2010-04-05
I cannot believe this does not exist in the current set of components, Delphi 7, as it must be something loads of apps require.

The win 3.1 pallete has a component to open a directory but unfortunately it cannot handle networks unless the drive is mapped.

Can I use the OpenDialog to open directories, I do not wish to select a file then extract the path. If so how do I go about this, if not how do I go about this?

Cheers

Chris
0
Comment
Question by:ChrisBerry
  • 4
  • 2
7 Comments
 
LVL 4

Expert Comment

by:ceoworks
Comment Utility
Hi Chris,

It should be exist in Dialogs tab. If it's not, take a look at the Component -> Configure Palette menu and select "All" from the left side and sort the components by their name. With this way, you can find where is TOpenDialog component is..  If you can't find it from there, install the dclstd70 package.

Cheers,

Oktay Sancak
0
 
LVL 6

Expert Comment

by:bpana
Comment Utility
use SelectDirectory function from FileCtrl unit.
0
 

Author Comment

by:ChrisBerry
Comment Utility
Hi

Thanks for the replies.

First. I have already tried the SelectDirectory function but this gives a dialog that again uses mapped directories, I want to have access to NetworkNeighborhood.

Second. TOpenDialog I have but this always requires me to select a file, I just want to select a directory. A TOpenDialog that would allow me to select a directory is just what I want. Am I missing something, as I cannot find this option in TOpenDialog?

Cheers

Chris
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 6

Expert Comment

by:bpana
Comment Utility
0
 
LVL 6

Expert Comment

by:bpana
Comment Utility
you can use SelectDirectory function:

uses FileCtrl;

var
  Dir: string;
begin
  if SelectDirectory(Choose the Source Dir! ', '\\frapsnt69\Backup', Dir) then
  begin
    Edit_Source.Text := Dir;
  end;
end;
0
 
LVL 6

Accepted Solution

by:
bpana earned 50 total points
Comment Utility
there are 2 overloaded SelectDirectory functions. Check my last comment.
0
 

Author Comment

by:ChrisBerry
Comment Utility
Great, got it!

I tried the wrong overload before.

Thanks

Chris
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now