Forum > Documentation (Maintaining -)
Feedback needed: TForm.SessionProperties topic
(1/1)
dsiders:
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 [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// var AForm: TForm;AForm.SessionProperties := 'Top;Left;WindowState;Image1.Visible;Image1.Transparent';
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
wp:
Correct, AFAIK.
dsiders:
--- Quote from: wp on April 26, 2022, 08:02:41 pm ---Correct, AFAIK.
--- End quote ---
Thanks @wp.
Navigation
[0] Message Index