RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomLocateFileService.FindTemplateFile Method

Generates an OnFindTemplateFile event.

Pascal
function FindTemplateFile(AComponent: TComponent; const AFileName: string; var AResult: string): Boolean;
C++
__fastcall Boolean FindTemplateFile(TComponent * AComponent, const AnsiString AFileName, AnsiString AResult);

TCustomLocateFileService calls FindTemplateFile internally to generate an OnFindTemplateFile event. 

AComponent is the object that uses or is associated with the requested template. Typically, this is a content producer. 

AFileName is the name of the file to locate. 

AResult returns the fully-qualified path name for the requested file. 

FindTemplateFile returns true if it supplies a file name as the value of the AResult parameter. It returns false if there is no OnFindTemplateFile event handler or if the event handler does not return a value for AResult. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!