Recent

Documentation Board

Please put documentation mutations, enhancements and errors in GitLab bugtracker, this group is for documenters  to talk over documentation and its tools.

Author Topic: Feedback needed: TForm.SessionProperties topic  (Read 2663 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1556
Feedback needed: TForm.SessionProperties topic
« on: April 26, 2022, 07:23:44 pm »
I am trying to update the TForm.SessionProperties topic in the CHM/HTML help. Frankly, it's a bit of black hole to me. I have written the following, but I am not sure if I've overlooked some aspect that should be mentioned.

Feedback requested.

TForm.SessionProperties

Delimited list of form and / or component properties saved to and restored from an external storage mechanism.

Description

SessionProperties is a String property with the names of properties, in the form instance or its child components. It allows published property values to be saved to and restored from an external storage mechanism like: TIniPropStorage, TXMLPropStorage, or TJSONPropStorage.

Values in the property are delimited using the ';' (SemiColon) character. Component properties require both the component and property names using dotted notation like 'Image1.Visible'. The values can be assigned at design-time using a dialog in the Lazarus IDE, or by setting the property value at run-time.

 For example:

Code: Pascal  [Select][+][-]
  1. // var AForm: TForm;
  2. AForm.SessionProperties := 'Top;Left;WindowState;Image1.Visible;Image1.Transparent';
  3.  

At design-time, the selection dialog in the IDE is limited to published properties since RTTI is used to display and access the property values. Use the event handlers in the storage mechanism, or its StoredValues property, to save or restore properties with lesser visibility. Use the Save and Restore methods in the storage mechanism to read and write the property values.

TForm sets the visibility for SessionProperties, introduced in TControl, to published.

See Also

TControl.SessionProperties
TCustomPropertyStorage
TIniPropStorage
TXMLPropStorage
TJSONPropStorage
« Last Edit: April 26, 2022, 10:41:15 pm by dsiders »

wp

  • Hero Member
  • *****
  • Posts: 13424
Re: Feedback needed: TForm.SessionProperties topic
« Reply #1 on: April 26, 2022, 08:02:41 pm »
Correct, AFAIK.

dsiders

  • Hero Member
  • *****
  • Posts: 1556
Re: Feedback needed: TForm.SessionProperties topic
« Reply #2 on: April 27, 2022, 12:05:21 am »

 

TinyPortal © 2005-2018