Open File Dialog (PRIM_APPL.ICommonDialogFileOpen)
Windows File Open dialog
Ancestors - None
Details
The Windows File Open Dialog is used for selecting a file to open.
This feature uses Windows functionality. Precise implementation will depend on the Windows version.
Example
Using the file open Dialog to select a file.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM *implements #Prim_App.iHelpHandler) Theme(#SYS_THEME<2015Blue>) Clientwidth(551) Clientheight(301) Left(165) Top(204) Width(567)
Define_Com Class(#PRIM_PHBN) Name(#Pick) Caption('Pick a File') Displayposition(1) Left(16) Parent(#COM_OWNER) Tabposition(1) Top(16) Width(129)
Evtroutine Handling(#Pick.Click)
#Com_owner.PickaFile
Endroutine
Mthroutine Name(PickaFile)
Define_Com Class(#Prim_appl.ICommonDialogFileOpen) Name(#FileOpen) Reference(*Dynamic)
#FileOpen <= #sys_appln.CreateFileOpenDialog
If (#FileOpen.Show)
#Com_owner.Caption := #FileOpen.FileTitle
Endif
Endroutine
End_Com
Properties
Name |
Description |
Default file extension |
|
Make the dialog appear like Windows Explorer |
|
The currently selected file |
|
Number of selected files |
|
Collection of all selected file names |
|
Caption to appear in the title bar |
|
Caption of the specified filter |
|
Total number of filters |
|
Collection of all all filter extensions |
|
Index of the currently selected filter |
|
Show or hide the ReadOnly property |
|
Initial folder to be shown in the dialog |
|
Allow multiple files to be selected |
|
Caption to show at in the title bar |
Methods
Name |
Description |
Add a file type filter Name, Extention |
|
Show as a modal dialog FormOwner, OKPressed |