Solved

Open Direcctory Dialog - Does one exist?

Posted on 2004-08-29
7
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 4

Expert Comment

by:ceoworks
ID: 11925670
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
ID: 11925750
use SelectDirectory function from FileCtrl unit.
0
 

Author Comment

by:ChrisBerry
ID: 11925872
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:bpana
ID: 11925889
0
 
LVL 6

Expert Comment

by:bpana
ID: 11925954
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
ID: 11926003
there are 2 overloaded SelectDirectory functions. Check my last comment.
0
 

Author Comment

by:ChrisBerry
ID: 11926227
Great, got it!

I tried the wrong overload before.

Thanks

Chris
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month5 days, 22 hours left to enroll

626 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