|
Previous Top Next |
Prototype: | (Byte pForce=True) |
pForce | Determines if ForceDefaultPath is set to True or False. Defaults to True. |
This method assigns the value of pForce to the ForceDefaultPath property. pForce defaults to True. If ForceDefaultPath is set to True then it will be forced as the startup folder when SelectFile or SelectFolder/SelectDir is called, unless the DefaultPath property is empty. This gives you the option to force the FileDialog to open for example in the last used folder, as in the example below, where the folder is stored using the INI Manager class (ABC)
Example:
FS ITFileSelectClass
Code
FS.AddFileMask('INI File','*.ini',True)
FS.AddFileMask('All Files','*.*.')
FS.SetDefaultPath(INIMgr.Fetch('UpdateGetFromINI','FS:INIFilename'))
FS.SetForceDefaultPath() !! Force use of DefaultPath
FS.SetCaption('Select INI File') !! Set FileDialog caption
FS.SelectFile(?Loc:IniFileName) !! Use control on window
!!Or
FS.SelectFile(Loc:IniFileName) !! Use variable
INIMgr.Update('UpdateGetFromINI','FS:INIFilename',FS.GetFilePart(Loc:IniFileName,FNS_FullPath))
See also: