TOpenDirectory
Version 1.01  -  July 1, 2001

Home page http://www.delphicity.com


TOpenDirectory package install

1. unzip the archive in a folder of your choice

2. In Delphi or C++Builder, select Component|Install Packages

Press the "Add..." button

Open the "Type" combo box and choose "Package collection (*.dpc)

Locate the TOpenDir.dpc file in folder of the unzipped archive

Select "Open"

Select "Finish" (1)

Select "OK" twice

Check the "DelphiCity" tab in the component palette.
The OpenDirectory object should have been added.

3. Open the \Demo\Demo.dpr project (2)


(1) the default directory for these component files is Delphi\Imports or CBuilder\Imports. If you plan to install the component files into another directory, don't forget to possibly add it to the Delphi or CBuilder search path.

(2) For C++Builder, if you get a "BPL library not found" error at runtime, uncheck the "Build with runtime packages" check box in Project | Options | Packages.


Methods

function Execute: boolean;
Displays the OpenDirectory dialog box. Returns true if the "Open" button has been selected, false if the "Cancel" button has been clicked. If true, the selected directory is available in the Directory property.


Public properties

property Directory: string;
returns the full path of the directory selected by the Execute function.


Published properties

property InitialDir: string;
Set this property to the initial directory you want to display when calling the Execute function. If no value is assigned to InitialDir, or if the specified directory does not exist, the initial directory is controlled by the global ForceCurrentDirectory variable. If ForceCurrentDirecotry is True, the dialog opens with the current working directory displayed. Otherwise, the dialog opens with either the current working directory or the My Documents directory, depending on the version of Windows.

property NoChangeDir: boolean;
If true, the current directory remains in its initial state, even if another directory has been choosen.

property NoPlacesBar: boolean; (Delphi 6 only)
If true, the places bar (a bar which contains shortcuts to places like the History folder and the Desktop) does not appear in the dialog.

property Title: string;
Set title to the text you want to appear in the dialog's title bar. If no value is assigned, the default dialog's title is “Open”.


Events

procedure OnCanClose (Sender: TObject; var CanClose: Boolean);
this event provides custom validation of the directory selected. Set CanClose to false to prevent the dialog from closing.

procedure OnClose (Sender: TObject);
occurs when the dialog closes.

procedure OnFolderChange (Sender: TObject);
occurs each time a directory is selected.

procedure OnShow (Sender: TObject);
occurs when the dialog opens.

 

Disclaimer

The author of this program accepts no responsibility for damages resulting from the use of this product and make no warranty or representation, either expressed or implied, including but not limited to, any implied warranty of merchantability or fitness for a practical purpose.

This software package is provided here "AS IS", and you the user, assume all risks when using them.


 

DESCRIPTION

TOpenDirectory is a VCL component for Delphi 4, Delphi 5 or C++Builder 5.

Derived from TOpenDialog, TOpenDirectory is adapted to directories operations. It allows you to select directories, a missing feature of TOpenDialog.

Most common parameters can be simply set from the Object Inspector.

 

SYSTEM REQUIREMENTS

  • Windows 95/98/NT/2000
  • Delphi 3/4/5/6, C++ Builder 5

 

REGISTRATION

Click here to register.