[Lazarus] Align property confusion

Mattias Gärtner nc-gaertnma at netcologne.de
Mon Oct 4 15:17:31 CEST 2010


Zitat von Graeme Geldenhuys <graemeg.lists at gmail.com>:

> 2010/10/4 Дмитрий Курашкин :
>> You need following:
>> 1. Drop additional panel (P3) on Form
>> 2. Make its border invisible and Aligh = alLeft
>> 3. Drop P2 on P3 and make P2.Aligh = alBottom
>> 4. Drop P1 on Form and make P1.Aligh = alRight
>>
>> As I know, it is the only way...
>
> Thanks I tried that, but there is a minor correction. P3 must be
> alClient, not alLeft.
>
> Now it looks like I wanted, but that's a really odd way of having to
> do it. I would think creation order, or the order in which you set
> Align would make a lot more sense - and reduce the amount of
> components (resources) required to accomplish the same result. I guess
> Borland was smoking something illegal the day they implemented the
> Align property. :-)

You can not use the creation order, because it is fixed. This would  
make it impossible to drag a control in the designer to another  
position.

The order in which you set Align is a bad idea, because
1. it needs a new property to store that
2. it is not clear/intuitive what should happen when you drag a  
control in the designer.

Borland implemented a limited, but visually easy to understand system.

IMO Borland did a few things wrong, but Align was a good idea.
Of course adding an optional more flexible layout engine would be an  
even better idea.

Mattias







More information about the Lazarus mailing list