VirtualStringTree (via GetIt) syntax error from compiler in Delphi 11

225 Views Asked by At

Just installed D11 and VirtualStringTree from GetIt. Couple of problems when trying to port a project over:

  1. Had to manually add uses VirtualTrees.Header to get the following statement to compile:

    VirtualStringTree1.Header.Options := VirtualStringTree1.Header.Options + [hoVisible]
    

    Don't remember having to do this before.

  2. Now for the question. This code won't compile:

    VirtualStringTree1.Header.Columns[0].Options := 
    VirtualStringTree1.Header.Columns[0].Options + [coVisible];
    

    Error is:

    E2003 Undeclared identifier 'coVisible'

1

There are 1 best solutions below

0
On

Both comments (@Brian and @dwrbudr) are good answers to the question. From JAM-Software (JAM-Software) Breaking Changes in upcoming V8:

Simple types, enums and constants have been extracted to the unit VirtualTrees.Types. In case you get a compiler error undeclared identifier, it is usually sufficient to add the unit VirtualTrees.Types to the uses clause. This breaking change will be frequently encountered. For enum you can also turn them into scoped enums.

Other code breaking changes in version 8 may be found at https://github.com/JAM-Software/Virtual-TreeView/wiki/Breaking-Changes-in-upcoming-V8

Moderator: Please give credit to @dwrbudr for this answer.