2

I have a code in Delphi 7 application. When I open it in Delphi XE4 and afterwards when I compare the both codes in SVN, I notice that all the dfm files have been changed. The changes which I notice is like:

Width = 443 --changed in Delphi XE4
Height = 277 --changed in Delphi XE4
ExplicitWidth = 443 --added automatically in Delphi XE4
ExplicitHeight = 277 --added automatically in Delphi XE4

How should I handle this unexpected behavior of RAD Studio?

  • 1
    [`Let it be`](http://stackoverflow.com/q/2476690/960757)... ;-) – TLama Sep 25 '13 at 07:10
  • @TLama - but its causing problems to me. Suppose I have changed only 2-3 lines in dfm file which already contains 3000 lines. When I open to compare it, instead of 2-3 lines change, I am seeing 300 lines change. Is there no solution of this kind of problem? –  Sep 25 '13 at 07:11
  • 1
    Similar question, [`Is there a Delphi option to 'lock' the design (layout) of a form against accidental changes?`](http://stackoverflow.com/q/5486957/576719). – LU RD Sep 25 '13 at 07:13
  • 2
    Commit the change to your VCS and you'll see no change. Those `Explicit...` properties are added just when you open the form with no change for the first time as far as I know. – TLama Sep 25 '13 at 07:16
  • You can also configure your diff viewer to ignore these lines. – Svein Bringsli Sep 25 '13 at 09:13

1 Answers1

4

If you want to suppress the generation of those properties in the .dfm you can use Andy Hausladen's DDevExtensions tool.

Personally, I think you may be better off accepting this new reality and admitting those changes into your reply once and for all. Sometimes it's easier to go along with a change like this rather than fighting it.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Would have been an option if even now Delphi would not add/remove those at random, garbling the repo history. – Kromster Mar 21 '23 at 07:38