Jump to content
dummzeuch

New Explicit Properties Filter expert in GExperts

Recommended Posts

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

  • Like 2
  • Thanks 1

Share this post


Link to post
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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×