OnGetFilePath

Description

This event is triggered when 1. the ShowFileDialog method has finished; 2. the methods LoadImage, LoadImageEx have finished with IfShowFileDialog set to true.

Syntax

.RegisterEvent('OnGetFilePath',function(bSave, filesCount, index, path, filename){...});

Remarks

bSave: 'true' -- show save file dialog, 'false' -- show open file dialog.
filesCount: How many files were selected. 0 means no file was selected or user closed/canceled.
index: The index of the currently selected file. 0-based. -1 means no file was selected.
path: The parent path of currently selected file(s), "\\" is not included. If method ShowFileDialog() failed, the initial directory path set in the ShowFileDialog method is returned.
filename: The current file name.

See Also

ShowFileDialog

Example

DWObject.RegisterEvent('OnGetFilePath', function(bSave, filesCount, index, path, filename){
    alert("bSave:" + bSave + " fileCount: " +  filesCount + " index: " +  index + " path: " +  path + "\\" +  filename);
});
Is this page helpful?

Leave a Reply

Your email address will not be published.