Vcl.StdActns.TFileOpenWith

From RAD Studio API Documentation
Jump to: navigation, search

Vcl.StdActns.TFileOpenVcl.StdActns.TFileActionVcl.StdActns.TCommonDialogActionVcl.ActnList.TCustomActionSystem.Actions.TContainedActionSystem.Classes.TBasicActionSystem.Classes.TComponentTFileOpenWith

Delphi

TFileOpenWith = class(TFileOpen)

C++

class PASCALIMPLEMENTATION TFileOpenWith : public TFileOpen

Properties

Type Visibility Source Unit Parent
class public
Vcl.StdActns.pas
Vcl.StdActns.hpp
Vcl.StdActns Vcl.StdActns

Description

TFileOpenWith is the standard action for displaying the dialog that lets users choose what application to user for opening a file.

Add TFileOpenWith to an action list to add the Open With dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the Open With dialog and then use the chosen application to open the file specified by the FileName property. If the FileName property was not previously set, TFileOpenWith first displays an Open dialog in which the user can select a file name before displaying the Open With dialog for the user to specify what application to use when opening that file.

Note: TFileOpenWith always displays the Open With dialog, even if the specified file already has an extension with a registered association. To let users open a file by letting Windows choose the application based on the extension (or bring up the Open With dialog automatically when there is no association for the extension), use the TFileRun action instead.

You do not need to do anything to launch the selected application. TFileOpenWith automatically opens the file using the application that the user selects.

Note: The Dialog property of TFileOpenWith represents the Open dialog in which a user selects the file to open, not the Open With dialog in which they choose the application to user for opening that file. Similarly, the OnAccept and OnCancel events do not occur after the action displays the Open With dialog – rather, they occur after the Open dialog that appears when the FileName property is not preset.

See Also