delphivirtualtreeviewdelphi-10.4-sydney

Delphi 10.4 stores default VirtualTree's default properties in .dfm file


After updating to Delphi 10.4 Sydney, my instances of TVirtualStringTree store their Colors.XYZ properties in the dfm files, although I left these on the default values:

enter image description here

In VirtualTrees.pas, these color values have a default value, which normally means these shall not be written to a dfm file:

  published
    property BorderColor: TColor index cBorderColor read GetColor write SetColor default clBtnFace;
    property DisabledColor: TColor index cDisabledColor read GetColor write SetColor default clBtnShadow;
    property DropMarkColor: TColor index cDropMarkColor read GetColor write SetColor default clHighlight;
    ...

How to get rid of these default colors in the dfm files?


Solution

  • This is result of the fact that StyleServices.IsSystemStyle used to return True in the designer former Delphi version, now in 10.4 it returns False.

    This will get fixed soon in Virtual TreeView: https://github.com/JAM-Software/Virtual-TreeView/issues/975