[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Dialogs' (#lcl)

TFileDialog

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TFileDialog : allows selection of a file from the current directory.

Declaration

Source position: dialogs.pp line 106

type TFileDialog = class(TCommonDialog)

  class procedure WSRegisterClass; override;

  

WSRegisterClass - Register this Class for the current Widget Set

protected

  function DoExecute; override;

  

The function that actually takes care of executing the dialog

  function GetFilterIndex; virtual;

  

GetFilterIndex - returns the Index value for the filename filter

  procedure SetFileName(); virtual;

  

SetFileName - specifies the filename in the file dialog

  procedure SetFilter(); virtual;

  

SetFilter - specifies the Filter for use in filename searching

  procedure SetHistoryList(); virtual;

  

SetHistoryList - specifies a list of strings that have been used in searching

public

  constructor Create(); override;

  

Create - constructor for TFileDialog: calls inherited Create, makes stringlists for files and history, initialises filter index

  destructor Destroy; override;

  

Destroy - destructor for TFileDialog: frees file and history lists then calls inherited Destroy

  procedure DoTypeChange; virtual;

  

DoTypeChange - perform the code for the OnTypeChange event

  function Execute; override;

  

A public method causing the dialog box to appear, offer the relevant choices to the user and act upon the choice

  property Files: TStrings; [r]

  

Stringlist which stores the names of the selected files.

  property HistoryList: TStrings; [rw]

  

HistoryList - stringlist containing the names of files recently accessed

  procedure IntfFileTypeChanged();

  

IntfFileTypeChanged - interface method for file type change

published

  property Title;

  

The Title or Caption to be shown at the top of the dialog box

  property DefaultExt: String; [rw]

  

Sets the default file extension for the file dialog box.

  property FileName: String; [rw]

  

String storing the name of the file chosen by the user as UTF8.

  property Filter: String; [rw]

  

A string which contains possible filename filters (eg .doc, .xmp, .pas etc).

  property FilterIndex: Integer; [rw]

  

This property sets which file filter is the default.

  property InitialDir: String; [rw]

  

Set the directory the dialog shows on opening.

  property OnHelpClicked: TNotifyEvent; [rw]

  

Event handler when the Help button is clicked

  property OnTypeChange: TNotifyEvent; [rw]

  

Event Handler when the selected file type is changed

end;

Inheritance

TFileDialog

  

TFileDialog : allows selection of a file from the current directory.

|

TCommonDialog

  

TCommonDialog : the base type from which other dialogs are derived

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TFileDialog : allows selection of a file from the current directory.

This is also the base class for the Open and Save (As) dialogs

The latest version of this document can be found at lazarus-ccr.sourceforge.net.