我们注意到,在检查更新时,我们的.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.