开发者

TDataModule inheritance

开发者 https://www.devze.com 2023-02-17 07:23 出处:网络
When I\'m trying to inherit TDataModule Delphi treat descendant class like a form giving them 开发者_高级运维properties like font and Client properties. (\"property does not exists\" exception on a ru

When I'm trying to inherit TDataModule Delphi treat descendant class like a form giving them 开发者_高级运维properties like font and Client properties. ("property does not exists" exception on a run-time)

TixDataModule = class(TDataModule);

TDM = class(TixDataModule)
end;

What Can I do to make it work?


Make sure that all the inherited components is marked with inherited rather than object in the in the dfm.

Toggle "dfm as text" and "dfm as visual" with Alt+F12.


  1. As TixDatamodule is just a synonym for TDatamodule, you can inherit directly from TDataModule
  2. If you really want to inherit from TixDataModule, then put TixDataModule in a separate unit, with its own .dfm.
0

精彩评论

暂无评论...
验证码 换一张
取 消