<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 15/04/2021 à 15:31, James Richters
via fpc-pascal a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:3bf701d731fb$9f0e3620$dd2aa260$@productionautomation.net"><br>
<pre class="moz-quote-pre" wrap="">How did you make the TVirtualStringTree open the first level? I've been looking to see how you did it but I don't see how that was done.</pre>
</blockquote>
unit uFileVirtualTree, line 360, method
ThVirtualStringTree.vst_expand_first_level; <br>
<blockquote type="cite"
cite="mid:3bf701d731fb$9f0e3620$dd2aa260$@productionautomation.net">
<pre class="moz-quote-pre" wrap="">I would like to have the second TVirtualStringTree expanded all the way out.</pre>
</blockquote>
it's easier, just : vst.FullExpand; <br>
You'll find it line 373, method ThVirtualStringTree.vst_expand_full;
<br>
<br>
<blockquote type="cite"
cite="mid:3bf701d731fb$9f0e3620$dd2aa260$@productionautomation.net">
<pre class="moz-quote-pre" wrap="">Is there a way to export the file list and the second TVirtualStringTree to a PDF file?</pre>
</blockquote>
As far as I know, there is no way to directly export it. I will have
a look if I have some time.<br>
<blockquote type="cite"
cite="mid:3bf701d731fb$9f0e3620$dd2aa260$@productionautomation.net">
<pre class="moz-quote-pre" wrap="">I would like to save settings to an INI file, things like window size, divider positions, ect.. I have done this with INI files in my console apps, I just write out every variable I want to save and read them back in.. but I'm curious if Lazarus is more sophisticated.. maybe it has a way to save all settings for a form by itself? Or do I do it the same way as my console app and save each variable myself?
Where is the proper place to load the INI file, where it would happen before the forms are displayed, and where is the proper place to save the INI file right before the program is closed?</pre>
</blockquote>
From tab "Misc", just drop a TIniPropStorage on your form. You need
to set the ini filename in the component.<br>
Then in the properties of the form, you'll find the
SessionProperties property with a "..." button on the right. This
opens a dialog which allows you to configure which properties of
which components you want to persist.<br>
<p>I have added this , configured for a "Configuration.ini" file and
"fFileTree" section.</p>
The following link is for TXMLPropStorage, but it work nearly the
same for TIniPropStorage. Just read the first paragraph "<span
class="mw-headline"
id="Using_TForm.SessionProperties_and_TXMLPropStorage">Using
TForm.SessionProperties and TXMLPropStorage</span>"<br>
<a class="moz-txt-link-freetext" href="https://wiki.freepascal.org/Remember_form_position_and_size#Using_TForm.SessionProperties_and_TXMLPropStorage">https://wiki.freepascal.org/Remember_form_position_and_size#Using_TForm.SessionProperties_and_TXMLPropStorage</a><br>
</body>
</html>