TApOpenDialog and TApSaveDialog components

Inherited from : TOpenDailog and TSaveDialog

Custom versions available as: TApCustomOpenDialog and TApCustomSaveDialog.

Types

Properties

Methods

Events



Types

TApCtrlQueryEvent

TApCtrlQueryEvent = procedure (Sender: TObject; var CanDoThat : boolean) of object;

This type is used for the new event handlers in this components: OnGoToParent, etc. CanDoThat variable determines whether you can do appropriate action. Setting this variable to False will disable standard response on this button click or other action.


TApOpenDlgControls and TApOpenDlgControl

TApOpenDlgControl = ( dcFolderCombo,
dcFolderLabel,
dcSelectionCtrl,
dcOkBtn,
dcCancelBtn,
dcFileName,
dcFileNameLabel,
dcFileType,
dcFileTypeLabel,
dcToolBar );

TApOpenDlgControls = set of TApOpenDlgControl;

These types are used in VisibleControls property to specify wich dialog controls are visible.


TApDlgListType

TApDlgListType = (ltShellView, ltCustCtrl);

This type is used to specify the type of selection control. See ListType property for details.



Properties


CustDlgParams : TApCustDlgParams; RW

Published; protected in custom version

This variable contains all information about side panels of the standard dialog. See TApCustDlgPatams type for details.

For Open/Save dialogs CustDlgParams.CustomForm points to form wich is replacement for standard selection shell list view when ListType property value is ltCustCtrl.


ListType : TApDlgListType; RW

Published; protected in custom version

Can be one of the following values : ltShellView or ltCustCtrl. ltShellView value points that standard shell selection control is visible and active. ltCustCtrl value specifies that any other Delphi form specified in CustDlgParams.CustomForm property can be used as selection control. You can select ltCustCtrl and set CustDlgParams.CustomForm to nothing to hide any file selection control (shell list view or custom control).


EditHandle : HWND; use when dialog is visible.

Protected

The EditHandle property, which provides access to the dialog’s edit control handle after a call to Execute, can be used in "dialog-time" event handlers. EditHandle is reset to 0 after the dialog is closed.


VisibleControls : TApOpenDlgControls; RW

Published; protected in custom version

Determines the visibility of the file-selection dialog controls.


DlgHandle : HWND; RW; use when dialog is visible.

Public

The handle of the dialog box. Keep in mind that its not the same as TOpenDialog.Handle protected property. DlgHandle property is reset to 0 after the dialog is closed.


SelectedFolder : string; R; use when dialog is visible.

Public; protected in custom version

Access this Read-only property to get currently selected folder path in the dialog box.


SelectedFiles : string; R; use when dialog is visible.

Public; protected in custom version

Access this Read-only property to get currently selected files in the dialog box. The result is in the folowing form:

"file1" "file2" "file3" "file4" ...



Methods


function GetNamesList(sl : TStrings); use when dialog is visible.

Public

Places currently selected files in TStrings descedant.

See also SelectedFiles property.



Events


All the new properties above are "dialog-time".

For all handlers: Published; protected in custom version

OnFolderCreate : TApCtrlQueryEvent

Occures if user presses "Create Folder" tool button.

OnListView : TApCtrlQueryEvent

Occures if user presses "List" tool button.

OnDetailsView : TApCtrlQueryEvent

Occures if user presses "Details" tool button.

OnDesktopShow : TApCtrlQueryEvent

Occures if user presses "Desktop" tool button.

OnParentGoto : TApCtrlQueryEvent

Occures if user presses "Up one level" tool button.

OnOkPress : TApCtrlQueryEvent

Occures if user presses Ok button. Set CanDoThat to False to prevent dialog box closing.

OnFilenameChange : TApCtrlQueryEvent

Occures if user tries to change selected files in the filename edit box. Set CanDoThat to False to prevent this change in some sutuations.

OnHookEvent : TWndMethod

General hook procedure. You can hook any message you want directry in this handler.