Contents - Index - Previous - Next


OnPromptForOverwrite Event 

 

Applies to

TVCLUnZip component

 

Declaration

property OnPromptForOverwrite: TPromptForOverwrite = procedure(Sender: TObject; var OverWriteIt: Boolean; FileIndex: Integer; var FName: string); of object;

 

 

Description

The OnPromptForOverwrite event handler is triggered when the property OverwriteMode is set to Prompt and a file is about to be overwritten.  This gives you a chance to determine whether to overwrite or not.  Set OverWriteIt to True if you wish to overwrite the file, otherwise the file will not be overwritten. You also have the opportunity to rename the file that is about to be unzipped.  If you do this, you should also set OverwriteIt to True. 

 

If this event is not defined and the property OverwriteMode is set to Prompt then the TVCLUnZip component will display a messagebox to ask whether the file that is about to be overwritten, should be overwritten.  In this case you do not get a chance to rename the file.