Control Name | Unit | Class |
RX Directory Edit | ToolEdit | TDirectoryEdit |
Description:
The TDirectoryEdit is a normal TEdit field for inputting
directory names. The TDirectoryEdit control has a button attached
to it. When the Onclick event is triggered (when you click on the
button), a dialog appears to allow the user to select a directory
name. When the user chooses OK in the dialog box, the selected
directory name is placed into the edit box's Text
property.
Optionally, you can also permit the user to choose multiple
directory names with the MultipleDir property.
This component use the SelectDirectory (Delphi) standard function
from FileCtrl unit to show the dialog box.
Property DialogKind
Declaration: DialogKind: TDirDialogKind;
Use this property to select between standard dialog types:
• dkVCL - standard Delphi VCL
dialog (using SelectDirectory standard function);
• dkWin32 - standard Windows "Browse For Folder"
dialog, used only in Windows95 or NT 4.x or higher. In NT 3.51
standard Delphi VCL dialog will be used regardless this property
value.
NOTE. When you set DialogKind to dkWin32 value, the DialogOptions property will be ignored.
Property DialogOptions
Declaration: DialogOptions: TSelectDirOpts;
The DialogOptions properties is a set of values. If DialogOptions is the empty set, the user can only select a directory that already exists. No edit box is provided for the user to enter a new directory name.
These are the possible values that
can be added to the DialogOptions set:
- sdAllowCreate - an edit box appears to allow
the user to type in the name of a directory that does not exist.
This option does not create a directory, but the application can
access the Text property to create the directory selected if
desired.
- sdPerformCreate
- Used only when DialogOptions contains sdAllowCreate. If the
user enters a directory name that does not exist, the
TDirectoryEdit creates it just the dialog is closed.
- sdPrompt - Used when DialogOptions contains
sdAllowCreate. Displays a message box that informs the user when
the entered directory does not exist and asks if the directory
should be created. If the user chooses OK, the directory is
created if DialogOptions contains sdPerformCreate. If
DialogOptions does not contain sdPerformCreate, the directory is
not created: the application should create it separately.
NOTE. In 32-bit version when DialogKind = dkWin32 this property is ignored.
Property MultipleDirs
Declaration: MultipleDirs: Boolean;
When MultipleDir = True, the directory name selected in the dialog will be added to the Text property; when False, the selected directory name will replace the text of the editor.
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000