dummzeuch 1506 Posted December 27, 2020 I never understood the benefit of writing the ExplicitLeft / Top / Width / Height properties for TControl and descendants, which were added in Delphi 2007, to the dfm files. They store the control’s position and size before its Align property was set to something like alClient or alRight, so they can be restored later. That’s useful if you change these by accident or double click on the Align property to go through the possible values, but as soon as you save the form, you don’t really need them any more. Even worse, they seem to change often with no apparent reason and therefore clutter a dfm file’s diff with changes that nobody is interested in. read on in the blog post 2 2 Share this post Link to post
Bill Meyer 337 Posted December 27, 2020 12 hours ago, dummzeuch said: Even worse, they seem to change often with no apparent reason and therefore clutter a dfm file’s diff with changes that nobody is interested in. And worse, these apparently random changes lead to increased noise levels in source control. Share this post Link to post
Andrea Raimondi 13 Posted December 28, 2020 Hi! As far as I know, those properties deal with different monitor sizes. Suppose that you're developing on a 1024x768 monitor, then a new colleague comes on board who's on a 1900xyaddayaddayadda. That's where the explicit properties kick in: now they are set because the monitor has a different resolution and if any changes in size are made to adjust for this, then the explicit properties will follow along. It's basically a way to have usable forms and data modules both at design and runtime for both developers and customers. . But that's my understanding and I may be wrong. Share this post Link to post
dummzeuch 1506 Posted December 28, 2020 10 hours ago, Andrea Raimondi said: But that's my understanding and I may be wrong. I think you are, because a different monitor resolution won't change anything for the position or size of a control. Only different pixel densities will, but these properties won't help there either. But whatever the reason for these properties, they are an annoyance and not useful for most people. Share this post Link to post
Attila Kovacs 629 Posted February 1, 2021 It comes handy for my form designer zoom as the IDE shat full the dfm with explicit values after a forced DPI change on the designed form. thx Share this post Link to post
Mike Torrettinni 198 Posted January 1, 2022 Thanks, I can't believe I tolerated these annoying useless .dfm changes for so long! Share this post Link to post
corneliusdavid 214 Posted January 3, 2022 FYI.. Andreas released an update to DDevExtensions for Delphi 10.4 in July, 2021. However, it's really nice that we have two places to get this feature. Thanks @dummzeuch! Share this post Link to post
dummzeuch 1506 Posted January 3, 2022 6 hours ago, corneliusdavid said: However, it's really nice that we have two places to get this feature. Thanks @dummzeuch! That should actually go to @Achim Kalwa who provided the code I integrated. Share this post Link to post