Despite the fact I have TVirtualTreeView installed, the project will not load, giving a series of error messages (see attached)...
Which TVirtualTreeView? The one from OPM? Or the one from
https://github.com/blikblum/VirtualTreeView-Lazarus? The project seems to be written for the latter one.
In order to get it working you must either install the github version or convert the sample project to the Lazarus OPM version.
These are the steps for the conversion:
- Load the uMain.pas into an external editor, change unit VirtualTrees to laz.VirtualTrees, and the type of TfMain member VTV from TVirtualStringTree to TLazVirtualStringTree. The same with member FSortDir (must be type Laz.VirtualTrees.TSortDirection). In procedure TfMain.VSTHeaderClick replace VirtualTrees by Laz.VirtualTrees.
- Next, load the lfm file into an external editor, find the line "VST: TVirtualStringTree" and replace the TVirtualStringTree by TLazTVirtualStringTree.
- Finally load the lpi file into the editor, find the line "<packageName Value="virtualtreeview_package"/>", and add the "laz." before the "virtualtreeview_package".
Now the project should work in Lazarus. See attachment.
The reason for this renaming action is that initially the Lazarus VTV had partially the original names which lead the issues for those users who wanted to work with the github version as well.