Le 15/04/2021 à 15:31, James Richters via fpc-pascal a écrit :

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.
unit uFileVirtualTree, line 360,  method ThVirtualStringTree.vst_expand_first_level;
I would like to have the second TVirtualStringTree expanded all the way out.
it's easier, just : vst.FullExpand;
You'll find it line 373, method ThVirtualStringTree.vst_expand_full;

Is there a way to export the file list and the second TVirtualStringTree to a 
PDF file?
As far as I know, there is no way to directly export it. I will have a look if I have some time.
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?
From tab "Misc", just drop a TIniPropStorage on your form. You need to set the ini filename in the component. 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.

I have added this , configured for a "Configuration.ini" file and "fFileTree" section.

The following link is for TXMLPropStorage, but it work nearly the same for TIniPropStorage. Just read the first paragraph "Using TForm.SessionProperties and TXMLPropStorage"
https://wiki.freepascal.org/Remember_form_position_and_size#Using_TForm.SessionProperties_and_TXMLPropStorage
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to