[fpc-pascal] Directory Tree

Jean SUZINEAU jean.suzineau at sfr.fr
Sun Apr 11 20:22:33 CEST 2021


TStringList works pretty much like an inifile section.
The index corresponds to the line number in you text block.
The Names property corresponds to the part of the line before the '=' char.
The ValueFromIndex property corresponds to the part of the line after 
the '=' char.
So if you line i contains "M:\Project1\File1=8:32", Names[i] will 
returns "M:\Project1\File1" and ValueFromIndex returns "8:32"
The text block (property Text) is viewed like a kind of list of virtual 
records "name=value"

You can iterate the nodes in the TreeView and change their text.

I have updated the example with a VirtualTreeView on a new form (you 
should download all the files in a different directory).
It's more complex to implement, but with checkboxes you just need a 
simple click.





More information about the fpc-pascal mailing list