[Lazarus] Testing 0.9.29

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Feb 19 23:58:36 CET 2011


Mattias Gaertner schrieb:

>>> Does the VCL automatically change the Anchors?
>> tested with turbo delphi.
>>
>> No the anchor is not changed.
>> but the behaviour is consistent.
>>
>> The Anchors are not used if size changes from autosize
> 
> If the VCL AutoSize ignores parts of the other layout settings then for
> me this sounds "inconsistent".

IMO LCL AutoSize tries to be too clever. In fact an "inner" resize, 
required to e.g. adjust the required width of an label, should be 
separated from an "outer" resize/realign, forced by a resize of the 
container.

Extensions like AnchorSides and ChildSizing may look nice, but should be 
added only when really needed. Otherwise they can adversely affect 
requirements of specialized controls or containers. When a (text) 
Alignment has to be taken into account, this cannot be implemented in a 
common (TWinControl) class, because not all controls have such a 
property, in fact every control class can have its own properties that 
should steer their size and placement. When such an DoAutoSize method is 
virtual, every overridden implementation can add whatever additional 
layout information is required.

In the most useful model every control would have its own (configurable) 
layout manager, selectable from an (extensible) number of predefined 
layouts. In fact the DockManager already *is* such an *installable* 
layout manager...

I wonder how one can implement installable DockManagers, and at the same 
time insists in non-installable layout managers :-(


> Cross platform forms require a consistent layout engine.

The form layout is always under control of the application, not affected 
by the target at all.

When you mean an consistent adjustment, required for changed language or 
theme, then I agree. But multiple themes are not a matter of platforms, 
and have to be handled by Delphi for Windows as well.

DoDi





More information about the Lazarus mailing list