[Lazarus] Align property confusion

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


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

> [...]
> I got a reply from Michael van Canneyt in private. He said as far as
> he knows it's due to the streaming system used in the VCL. So "order
> of creation" is never guaranteed, and can never make assumptions about
> that.

To clarify:
The order of creation is fixed (in the sense of determinate). It is a  
stream after all.
What Michael meant is that creation order can get complicated, e.g.  
with inheritance, frames and special components auto creating their  
children and that some designer operations change creation order.  
Therefore you should not use creation order for anything else than for  
creation issues.


> So a hard-coded top,bottom,left,right,client processing order
> was put it place.
>
>
> What is weird is that neither Delphi, nor Kylix, nor LCL help mentions
> this hard-coded order of processing. At least the LCL TAlign help
> mentions the possible issue of "order of precedence", but doesn't
> actually give the answer or reasoning why it exists.

The wiki describes the algorithm with examples:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Align

The property should probably link to the corresponding wiki page. Or  
better: Integrate the wiki content and the fpdoc entries.


Mattias







More information about the Lazarus mailing list