[Lazarus] Align property confusion

Michael Van Canneyt michael at freepascal.org
Mon Oct 4 15:10:08 CEST 2010



On Mon, 4 Oct 2010, Dimitri Smits wrote:

>
> ----- "Graeme Geldenhuys" <graemeg.lists at gmail.com> schreef:
>
>> 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. :-)
>> 
>> Thanks again for the response.
>> 
>
> I think it rather stems from the Windows world rather than Borland's bright minds. AFAIK it always was: horizontal takes precedence on vertical. So Top/Bottom fills entire width, Left/Right takes the remaining height, Client fill's the rest.

Not really.

The problem is that there is no 'creation order'. The streaming system
doesn't guarantee you in which order components are created. Therefor, the
'order of setting the align property' is not well-defined, and therefor is 
not taken into account when doing layouting.

Michael.


More information about the Lazarus mailing list