|
|
|
|
|
SftOptionsIO.File Property |
Defines the file used to store property settings.
Syntax
|
VB.NET |
FileName = object.File As String |
||
|
VB |
FileName = object.File As String |
||
|
C#.NET |
string FileName = object.File; |
||
|
VC++ |
_bstr_t FileName = object->File;
|
||
|
C |
HRESULT object->get_File(BSTR* FileName); |
||
|
Delphi |
FileName := object.File : WideString; |
||
|
VB.NET |
object.File = FileName As String |
||
|
VB |
object.File = FileName As String |
||
|
C#.NET |
string object.File = FileName; |
||
|
VC++ |
_bstr_t object->File = FileName;
|
||
|
C |
HRESULT object->put_File(BSTR FileName); |
||
|
Delphi |
object.File := FileName : WideString; |
||
object
A SftOptionsIO object.
FileName
Defines the file used to store property settings, a full path or a partial path with leading "-" character (see below).
Comments
The File property defines the file used to store property settings.
The SftOptions.Load and SftOptions.Save methods are used to transfer options between the location defined by the File or SftOptionsIO.Registry property settings and the SftOptions control.
If the File property is set to a non-null string, the SftOptionsIO.Registry property is cleared.
If the String argument starts with a "-" character, the remainder (excluding the "-" character) is appended to the system defined application data folder. This folder is generally named "Documents and Settings\username\Application Data", which is usually a hidden folder. This folder name can be obtained using the Windows API SHGetFolderPath CSIDL_APPDATA.
The File property can define a full path (explicitly or by using the "-" character). Any subdirectories that are specified are automatically created when the first option value is saved.
When using the leading "-" character, it is recommended to use an initial subdirectory name, uniquely identifying the application or the company name, in order to avoid any accidental naming conflict.
The SftOptionsIO.OptionValue property is used to retrieve (or set) an option value as it is currently saved in the location defined by the File or SftOptionsIO.Registry property settings. The OptionValue property value is identical to the SftOptsIO control's SftOptsIO.OptionValue property.
Example
SftOptions1.Add "", "Main", "Your first sample", entrySftOptionsTopic, "", "", Nothing, "", "", "", "" SftOptions1.Add "Main", "Rb1", "Radio Button 1", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", "" SftOptions1.Add "Main", "Rb2", "Radio Button 2", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", "" SftOptions1.Add "Main", "Rb3", "Radio Button 3", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", "" SftOptions1.Add "", "Cb1", "Check Box Option", entrySftOptionsCheckBox, "", "", Nothing, "", "", "", "" SftOptions1.IO.File = "-\SftOptionsTest\Sample1.ini" SftOptions1.Load SftOptions1.InitializationComplete
See Also SftOptionsIO Object | Object Hierarchy