wwUtils::OpenFileDialog

Open file dialog that prompts for a file name. Unlike GetFile() this function returns the file name and path in proper case and uses the latest Windows dialogs.

OpenFileDialog(lcFolder, lcCaption,
               lcTitle, lcExtensions, 
               llCheckIfFileExists)

Return Value

Filename or ""

Parameters

lcFolder
The initial folder to show in the dialog.

lcCaption
The caption next to the filename

lcTitle
The Window title of the dialog.

lcExtensions
"Png Image|.png|JPEG Image|.jpeg|Gif Image|.gif|Tiff Image|.tiff|All Files|."

llCheckIfFileExists
If .T. requires that the file exists. Otherwise you can type in a name that doesn't exist.

Remarks

Requires wwDotnetBridge and .NET

Example

lcImage = OpenFileDialog(lcImagePath,"Select image:","Embed Image File",;
   			 "Png Image|*.png|JPEG Image|*.jpg;*.jpeg|All Files|*.*",.T.)

IF EMPTY(lcImage)
  CD (lcOldPath)
  RETURN ""
ENDIF

See also:

Class wwUtils

© West Wind Technologies, 1996-2024 • Updated: 01/07/19
Comment or report problem with topic