dummzeuch 769 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 1 Share this post Link to post
Bill Meyer 212 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 11 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 769 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