[Lazarus] AlignTop/AlignBottom issue

Giuliano Colla giuliano.colla at fastwebnet.it
Tue May 26 18:46:46 CEST 2015


Il 26/05/2015 14:50, Mattias Gaertner ha scritto:
> It works like this:
> http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Order_of_controls_with_same_Align

The reason of my request is that it doesn't appear to work like this. 
Quoting the #Align paragraph:

> First all controls with alTop are put to the top of the client area. 
> If there are several controls with alTop the last added/moved will be 
> put topmost.
....
> Then all controls with alBottom are put to the bottom of the client 
> area. Otherwise it works analog to alTop. 

This scheme provides a predictable order, although different from 
Delphi's one which places the last added/moved at the bottom for alTop. 
It makes it possible to lay out components as desired.

What happens with the sample program I've posted in the bugtracker is 
that with an order of the commands 1-2-3-4-5-6-7 (executed one by one, 
with a click event), the resulting order of the components is 
4-3-5-2-6-1-7, which appears rather crazy.

The "Order of controls with same Align" should apply when several 
controls are added/moved simultaneously, not when they're moved one by one.

Giuliano






More information about the Lazarus mailing list