Diggie
asked on
saving several settings
(sorry if this has been asked before..)
I want to save several usersettings to registry. I've created a form with edtiboxes on a pagecontrol and a function to save a setting to the registry. This works fine, but I want to automate the function so that it scrolls trough the pages and save every editbox text property in the Reg. using the editbox name property. (This seems an easy way to store mult. settings; any suggestion is welcome!)
I want to save several usersettings to registry. I've created a form with edtiboxes on a pagecontrol and a function to save a setting to the registry. This works fine, but I want to automate the function so that it scrolls trough the pages and save every editbox text property in the Reg. using the editbox name property. (This seems an easy way to store mult. settings; any suggestion is welcome!)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Diggie,
Have a look at this article/component from Delphi Informant magazine.
http://www.delphizine.com/features/1997/10/di199710rv_f/di199710rv_d.asp
it can save virtually any aspect of a form to the registry
Mark
Have a look at this article/component from Delphi Informant magazine.
http://www.delphizine.com/features/1997/10/di199710rv_f/di199710rv_d.asp
it can save virtually any aspect of a form to the registry
Mark
ASKER
Damn! (Sorry for my language!)
This was my own solution for the problem (although I didn't work out the complete code...). I just wondered if this is the way professional programmers store their settings, or that I was barking at the wrong tree...
Anyway, thank you for your reply (and for showing me i'm not an idiot)
This was my own solution for the problem (although I didn't work out the complete code...). I just wondered if this is the way professional programmers store their settings, or that I was barking at the wrong tree...
Anyway, thank you for your reply (and for showing me i'm not an idiot)
for i := 0 to ComponentCount - 1 do
if (Components[i].Parent = Pagecontrol1) and (Components[i] is TEdit) then
with (Components[i] as TEdit) do
ToRegistry(Name, Text);
Not sure if this is what you're looking for...