Recent

Author Topic: Save Form Sittings  (Read 7694 times)

Sora-Kun

  • Full Member
  • ***
  • Posts: 162
  • I can smell your presence ...
    • Sora-Kun
Save Form Sittings
« on: June 26, 2010, 03:42:34 pm »
hello,
This might be a stupid question, but i'll post it
Is there a function or something that saves the form sittings like the Last checked checkbox and The Position of the spitters for exemple or the forum resolution.
Thanks  ;D
if nothing suites you, make it your self!
The Revolution, Genesis. The next generation IDE.
If you want to help, PM me.

Made in Lazarus.
Soon, in The WWW.

stonefull

  • Jr. Member
  • **
  • Posts: 54
Re: Save Form Sittings
« Reply #1 on: June 26, 2010, 04:29:39 pm »
Use XMLPropStorage or IniPropStorage. Define settings on form property SessionProperties.

Sora-Kun

  • Full Member
  • ***
  • Posts: 162
  • I can smell your presence ...
    • Sora-Kun
Re: Save Form Sittings
« Reply #2 on: August 18, 2010, 11:51:03 pm »
Thanks for replying,
I got how to set the session properties but i don't know what to do next, I don't know how to use IniPropStorage, or XMLPropstorage.
Please help. Thanx ;)
if nothing suites you, make it your self!
The Revolution, Genesis. The next generation IDE.
If you want to help, PM me.

Made in Lazarus.
Soon, in The WWW.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Save Form Sittings
« Reply #3 on: August 19, 2010, 03:09:53 am »
Create 2 items in StoredValues at design time and write;

Code: [Select]
procedure TForm1.XMLPropStorageRestoreProperties(Sender:TObject);
begin
  Left := StrToIntDef(XMLPropStorage.StoredValues[0].Value,0);
  Top := StrToIntDef(XMLPropStorage.StoredValues[1].Value,0);
end;

procedure TForm1.XMLPropStorageSavingProperties(Sender:TObject);
begin
  XMLPropStorage.StoredValues[0].Value := IntToStr(Left);
  XMLPropStorage.StoredValues[1].Value := IntToStr(Top);
end;
   
« Last Edit: August 19, 2010, 03:19:25 am by typo »

 

TinyPortal © 2005-2018