Delphi - Why does ExplicitWidth and ExplicitHeight keep appearing in .DFM files and what is it?

廉价感情. 提交于 2019-11-29 05:25:18

From Googling....

Original article can be found here.

The Explicit properties remember the previous bounds of a control before the Align or Anchor properties are changed from their defaults.

The only time the Explicit properties are not written is when the Align property is set back to its default value of alNone.

This is when the Explicit properties are actually used by the control to reset its bounds to what it was previously.

With DDevExtensions you can disable storing these properties in the dfm:
http://andy.jgknet.de/blog/?page_id=10

Adds Explicit* property remover to keep DFM files compatible to older Delphi versions

Delphi adds value of published properties to DFM file only when its value different from default.

For example:

property ExplicitWidth: Integer read FExplicitWidth write FExplicitWidth default 1;

If ExplicitWidth value is not 1 then it will be written to the DFM. When the "default" is not defined then any value will be written to the DFM.

TcxSplitter is not standard Delphi component, you'd better ask its author about the purpose of the properties.

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