Rx File Editor

RX Library

Control Name Unit Class
RX File Edit ToolEdit TFilenameEdit

Description:
The TFilenameEdit is a normal TEdit field specially designed for inputting filenames. The TFilenameEdit control has button. The button is automatically aligned to the right side of the edit field and triggers an event when clicked (OnButtonClick).

On the click event of this button you get a dialog to allow the user to select a file name. The standard Delphi TOpenDialog component used to show dialog box. When the user chooses OK in the dialog box, the user's filename selection is stored in the edit box's FileName property, which you can then use to process as you want. The Text property contains same string as the
FileName property, but in 32-bit version the long filenames with spaces enclosed in double-quotes.


Property AcceptFiles
Declaration: AcceptFiles: Boolean;

AcceptFiles property specifies whether or not drag-and-drop operations are enabled. When True, user can drag files and directories from the FileManager or Windows Explorer and drop it on the TFilenameEdit or TDirectoryEdit controls. The OnDropFiles event is called when files are dropped on the edit box.


Property Dialog
Declaration: Dialog: TOpenDialog;

Read-only property to the direct access to the TOpenDialog component, than called by the TFilenameEdit control.


Property DialogFiles
Declaration: DialogFiles: TStrings;

Run-time and read only. The DialogFiles property value contains a list of all the file names selected in the TOpenDialog dialog box including the path names.

Property DialogKind
Declaration: DialogKind: TFileDialogKind;

Use this property to select between standard dialog types:

  • dkOpen - TOpenDialog
  • dkSave - TSaveDialog
  • dkOpenPicture - TOpenPictureDialog (Delphi 3.0 or higher)
  • dkSavePicture - TSavePictureDialog (Delphi 3.0 or higher)

Property DialogOptions
Declaration: DialogOptions: TOpenOptions;

DialogOptions is a set of flags that determine the behavior of the popup dialog. This property allows you to set the Options property of the TOpenDialog component.


Property FileName
Declaration: FileName: string;

The FileName property specifies the file name that the TFilenameEdit displays and that appears in the File Name edit box when the pop-up dialog box opens.


Event OnAfterDialog
Declaration: OnAfterDialog: TExecOpenDialogEvent;

OnAfterDialog event occurs on filename or directory edit controls just after the open-file dialog or select-directory dialog was closed. OnAfterDialog allows an application to validate the selected value. The value of the Action parameter determines if the editor can accept new value or not.


Event OnBeforeDialog
Declaration: OnBeforeDialog: TExecOpenDialogEvent;

OnBeforeDialog event occurs on filename or directory edit controls before the open-file dialog or select-directory dialog was showed. OnBeforeDialog allows an application to change the value passed to the dialog. The value of the Action parameter determines if the dialog can show or not.


Event OnDropFiles
Declaration: OnDropFiles: TNotifyEvent;

If the AcceptFiles property is True then this event is called when files are dropped on the edit box from FileManager or Windows Explorer.


Const scAltDown
Declaration: scAltDown = scAlt + vk_Down;;

scAltDown constant specifies the default key combination (Alt+Down) for ClickKey property of the TComboEdit, TDateEdit, TFilenameEdit and TDirectoryEdit components.


Type EComboEditError
Declaration: EComboEditError = class(Exception);

EComboEditError is the exception class for data that are invalid for TComboEdit and inherited components.


Type TCalendarStyle
Declaration: TCalendarStyle = (csPopup, csDialog);

The TCalendarStyle type is the type of the CalendarStyle property for a date editors (TDateEdit and TDBDateEdit components).


Type TDirDialogKind
Declaration: TDirDialogKind = (dkVCL, dkWin32);

The TFileDialogKind type contains the values the DialogKind property of directory edit can assume.


Type TExecDateDialog
Declaration: TExecDateDialog = procedure(Sender: TObject; var Date: TDateTime; var Action: Boolean) of object;

The TExecDateDialog type points to a method that handles the retrieving of the date value from pop-up calendar or modal dialog to the TDateEdit control.


Type TExecOpenDialogEvent
Declaration: TExecOpenDialogEvent = procedure(Sender: TObject; var Name: string; var Action: Boolean) of object;

The TExecOpenDialogEvent type points to the method that handles the closing of a pop-up dialog.


Type TFileDialogKind
Declaration: TFileDialogKind = (dkOpen, dkSave, dkOpenPicture, dkSavePicture);

The TFileDialogKind type contains the values the DialogKind property of filename edit can assume. Values dkOpenPicture, dkSavePicture are allowable in Delphi 3.0 or higher only.


Type TGlyphKind
Declaration: TGlyphKind = (gkCustom, gkDefault, gkDropDown, gkEllipsis);

The TGlyphKind type contains the values the GlyphKind property of combo edits (TComboEdit, TFilenameEdit, TDirectoryEdit, TDateEdit, TDBDateEdit) can assume.


Property Initial Dir: String;
InitialDir variable contains the Initial Directory where to select the file from.


Property History : tStringList
History property contains a list of previously selected files.


Property DefaultExt: string;
DefaultExt variable stores the default extension, example: ".doc"


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000