Class: SaveAsDialog
Properties | Events | Methods | Index of Classes
Provides access to the Windows file-save dialog
Hierarchy
cObject > AbstractFileDialog > SaveAsDialog
Show full hierarchy and direct subclasses
- cObject
- AbstractFileDialog
- SaveAsDialog
Library: Windows Application Class Library
Package: File_Dlg.pkg
Description
SaveAsDialog is used to provide access to the Windows file-save dialog. Objects of this class enable users to enter file names.
Sample
Use dfAllEnt.pkg
Use File_Dlg.pkg
Object oPanel is A Panel
Set Size To 50 175
Set Location To 25 12
Set Label To 'SaveAs Dialog Example'
Object oSaveFile is a SaveAsDialog
Set Filter_String To ;
'Source|*.src|Include Files|*.inc|Packages|;
*.pkg|All Source|*.src;*.pkg;*.inc'
Set Initial_Folder To 'C:\Program Files\DataFlex 10\pkg'
Set Dialog_Caption To 'Please Give the Package a Name...'
Set File_Title To 'MyPackage'
End_Object
Object oSave_bn IS A Button
Set Location To 10 10
Set Label To 'Save As...'
Procedure OnClick
Boolean bSave
String sFileTitle sFileName
Get Show_Dialog of (oSaveFile(Self)) To bSave
If (bSave) Begin
Get File_Title of (oSaveFile(Self)) To sFileTitle
Get File_Name of (oSaveFile(Self)) To sFileName
Send Info_Box ;
("File Title=" +sFileTitle +"\nFile Name=" +sFileName)
End
Else ;
Send Info_Box "You choose NOT to save"
End_Procedure
End_Object
End_Object
Start_UI
Syntax
Use File_Dlg.pkg
Object oObjectName is a SaveAsDialog
Set Filter_String To filter-string
Set Initial_Folder To folder-name
Set Dialog_Caption To text
Set File_Title To default file-name
End_Object
See Also