PdcApplication.OpenFileDialog: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == OpenFileDialog(InitialDirectory As String, FileMask As String, AllowZip As Boolean, AllowMulti As Boolean) as String == Description == Open a file browser d..."
 
No edit summary
Line 7: Line 7:


== Parameters ==
== Parameters ==
InitialDirectory : the initial directory where the file browser is opened. If this is empty, or the directory cannot be found, it will open at the root level.<br>
FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used. If you want to only show pdf files, you can use *.pdf . <br>
FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used.<br>
AllowZip : Allow the user to select zip files
AllowMulti : Allow the user to select multiple files
AllowMulti : Allow the user to select multiple files



Revision as of 14:14, 4 April 2023

Declaration

OpenFileDialog(InitialDirectory As String, FileMask As String, AllowZip As Boolean, AllowMulti As Boolean) as String

Description

Open a file browser dialog via Bemet to select a file to upload. This will return the full path of the selected file as a String. If multiple files are selected, then their paths will be returned as a commaseparated String. If this form is canceled without selecting a file, an empty string will be returned.

Parameters

FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used. If you want to only show pdf files, you can use *.pdf .
AllowMulti : Allow the user to select multiple files

Notes

This method is only available in the EciCloud!!
When used in an on-prem version of Bemet, it will return an empty string, and write an error to LastErrorString.

Code example

Dim Result As String = PDC.App.OpenFileDialog(tbInitialDirectory.Text, tbFileMask.Text, cbAllowZip.Checked, cbAllowMulti.Checked)

Availability

Available since march 2023. Bemet 2023R2 and higher.