Windows File Save dialog |
Ancestors - None
Use the SaveAs dialog to enable the end-user to save a file.
This example prompts for a filename and then saves the list as that file.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Theme(#SYS_THEME<2015Blue>) Clientwidth(551) Clientheight(301) Left(165) Top(204) Width(567)
Define_Com Class(#PRIM_PHBN) Name(#Save) Caption('Save') Displayposition(1) Left(416) Parent(#COM_OWNER) Tabposition(1) Top(264) Width(129)
Def_List Name(#List) Fields(#xDemoNumber) Type(*Working)
Evtroutine Handling(#Com_owner.CreateInstance)
Begin_Loop Using(#xDemoNumber) To(10)
Add_Entry To_List(#List)
End_Loop
Endroutine
Evtroutine Handling(#Save.Click)
#Com_owner.Save
Endroutine
Mthroutine Name(Save)
Define_Com Class(#Prim_appl.ICommonDialogFileSave) Name(#FileSave) Reference(*Dynamic)
#FileSave <= #sys_appln.CreateFileSaveDialog
#FileSave.File := "SuggestedName.txt"
If (#FileSave.Show)
Use Builtin(Transform_list) With_Args(#List #FileSave.File T) To_Get(#IO$STS)
Endif
Endroutine
End_Com
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 | |
FilterCount property | |
FilterExtension property | |
Index of the required filter | |
Initial folder to be shown in the dialog | |
Allow multiple files to be selected | |
Prompt for file overwrite if required | |
Caption to show in the title bar |
Name | Description |
|---|---|
Add a file type filter Name, Extention | |
Show as a modal dialog FormOwner, OKPressed |