微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Delphi – 为什么ExplicitWidth和ExplicitHeight继续出现在.DFM文件中,它是什么?

我们注意到,在检查更新时,我们的.DFM文件添加了ExplicitWidth和ExplicitHeight属性,看起来没有什么特别的原因。

我的两个问题是,他们是什么,为什么他们被Delphi自动添加

下面是具有该属性的示例:

object Splitter2: TcxSplitter
    Left = 0
    Top = 292
    Width = 566
    Height = 8
    Cursor = crVSplit
    HotZoneClassName = 'TcxXPTaskBarStyle'
    AlignSplitter = salBottom
    Control = BottomPanel
    Color = clBtnFace
    ExplicitWidth = 8
end

解决方法

来自Google搜寻….

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.

原文地址:https://www.jb51.cc/delphi/103653.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐