更新到Delphi 10.4 Sydney之后,我的TVirtualStringTree实例将其Colors.XYZ属性存储在dfm文件中,尽管我将其保留为默认值:
在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文件中的这些默认颜色?
这是由于StyleServices.IsSystemStyle
以前在设计器的先前Delphi版本中返回True,现在在10.4中它返回False。