TColorProperty Delphi Berlin 10.1.2?

◇◆丶佛笑我妖孽 提交于 2019-12-12 13:23:31

问题


I'm trying to convert a component from Delphi 7 to Delphi Berlin (flatstyle component: https://sourceforge.net/projects/flatstyle/)

After many changes in the source, i´m stuck in TColorPorperty

See below:

type
  TRxColorProperty = class(TColorProperty)
  public
    function GetValue: string; override;
    procedure GetValues (Proc: TGetStrProc); override;
    procedure SetValue (const Value: string); override;

In Delphi 7, this class is in VCLEditors unit. But i can´t find in Delphi Berlin.

Someone can tell me where to find her in Delphi Berlin?


回答1:


I know this is not what you asked (due to my low reputation points I could not comment this) but I'm using the same component on RAD studio Seattle. It is not tested on Berlin though.

Here is the link. Use it on your own risks.

The same installation steps in delphi 7 are applied her.

Regards; Nasreddine.




回答2:


The TFlatDesignRegister.pas unit is using the outdated DsgnIntf unit. That unit was removed and refactored in Delphi 6 into various new units (DesignIntf, DesignEditors, VCLEditors, etc). There is no way the code would compile as-is in Delphi 7. Any changes needed to make it compile in Delphi 7 still apply in 10.1 Berlin.

In Delphi 6 onwards, TColorProperty is in the VCLEditors unit, which still exists in 10.1 Berlin.

That being said, the runtime code (components, etc) and the design-time code (editors, IDE registrations, etc) must be separated into different packages, where the design-time package requires the runtime package and the DesignIDE package. The package files included in the download are NOT setup that way. Old IDE versions did not enforce that, but modern IDE versions do. So make sure you are making that change when creating new packages for 10.1 Berlin.



来源:https://stackoverflow.com/questions/42372689/tcolorproperty-delphi-berlin-10-1-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!