You are here: Home Delphi Stuffs NiceSettings
Release Date: June 8th, 2003
NiceSettings is an easy and sophisticated way to add saving and restoring state
capabilities to your Delphi applications. It can automatically save and restore
form properties and components taking advantage from RTTI. All you have to do
is specifying which properties are to be saved and restored.
Limitation: This component uses RTTI. So it only work with published properties
of the form and it's components.
This library is released under Mozilla Public License. You can use it in your
freeware, shareware or commercial softwares. You can send your modification
to me, and if I decide to include it in the main distribution, I will add your
name as a contributor. You can read full licensing information here.
There is no special process to install it on Delphi. Just open NiceSettingsD7.dpk
on Delphi IDE and press Install button. I use Delphi 7. If you use another Delphi
version, you may have to make some minor changes.
The component will appear in priyatna.org tab.
- Place an instance of TNiceSettings on a TForm.
- Fill StoredProperties (TStrings) property with appropriate value
(see demo project).
- Call its LoadSettings method on FormCreate.
- Call its SaveSettings method on FormClose.
There are some methods and properties of the component:
- procedure LoadSettings;
Loads previously stored settings. Usually you call this method on FormCreate
- procedure SaveSettings;
Saves current settings. Usually you call this method on FormClose or FormDestroy
- property StoredProps: TStrings;
This is where you can specify which properties to be saved. One line for each
property. You can also save children component properties using "component
name + dot + property" format, for example "Memo1.Color",
- property StoreTarget: TStoreTarget;
Specifies where to save settings. Currently you have two options: stIniFile
saves to an INI file, stRegistry saves to registry under HKEY_CURRENT_USER.
- property RegKey: string;
Specifies in which key branch the component will save the settings in the
- property IniFile: string;
Specifies the name of INI file to use when saving settings.
Download full source code and demo here: