Delphi 10.4将默认VirtualTree的默认属性存储在.dfm文件中

问题描述 投票:1回答:1

更新到Delphi 10.4 Sydney之后,我的TVirtualStringTree实例将其Colors.XYZ属性存储在dfm文件中,尽管我将其保留为默认值:

enter image description here

VirtualTrees.pas中,这些颜色值具有默认值,这通常意味着这些颜色值不应写入dfm文件:

  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;
    ...

如何消除dfm文件中的这些默认颜色?

delphi virtualtreeview delphi-10.4-sydney
1个回答
0
投票

这是由于StyleServices.IsSystemStyle以前在设计器的先前Delphi版本中返回True,现在在10.4中它返回False。

© www.soinside.com 2019 - 2024. All rights reserved.