EhLib.Com https://forum.ehlib.com/en/ |
|
PropStorageEh https://forum.ehlib.com/en/viewtopic.php?f=5&t=1215 |
Page 1 of 1 |
Author: | DavidJP [ 21 Apr 2023, 08:55 ] |
Post subject: | PropStorageEh |
In a TDBGridEh I allow the user to move the columns and to modify their width. I use a PropStorageEh component to save the Columns information in the Registry with RegPropStorageManEh. Is there a way to delete the information saved in the Registry, if the user has made so many changes that he wants to start from scratch? |
Author: | EhLibSupport [ 26 Apr 2023, 09:57 ] |
Post subject: | Re: PropStorageEh |
Hello One option is to delete the section manually. Code: reg.DeleteKey(RegPropStorageManEh1.Path + '\' + PropStorageEh1.Section); But after that, you need to cancel saving the settings Code: PropStorageEh1.Active := False; so that when the form is closed, the old settings are not saved in the registry again.After that, you need to re-open the Form. Code: procedure TForm1.Button1Click(Sender: TObject);
var reg: TRegistry; begin reg := TRegistry.Create; reg.RootKey := RegPropStorageManEh1.Key; reg.DeleteKey(RegPropStorageManEh1.Path + '\' + PropStorageEh1.Section); reg.Free; PropStorageEh1.Active := False; end; |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |