[Lazarus] Anchoring buttons (or other graphical elements)

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 16 10:29:46 CET 2012


On Thu, 16 Feb 2012 07:23:15 +0100
Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:

> Mattias Gaertner schrieb:
>  >> but what strikes me is that horizontal
>  >> and vertical borders seem
>  >> to be treated differently. Is there a reason for this?
>  > Why do you think so?
> 
> Well, at first the documentation only mentions horizontal borders to be 
> the maximum of both elements but nothing that this also applies to 
> vertical borders. It says:
> -------------------------------
> The horizontal space between two controls (LeftControl, RightControl on 
> Parent) is the maximum of ...
> -------------------------------
> But no words about the vertical alignment.

I added it analog.

 
> And second that was my experience too. But I just tried it again on a 
> fresh project and now suddenly vertical alignment behave the same! This 
> "eratic" (unpredictable, at least to me) behaviour was the reason I 
> wanted to look into the documentation but it did not make it clearer but 
> more obscure. It seems I have to invest much more time into this than I 
> wanted...

There is only one difference between vertical and horizontal and that
is Delphi compatible: Align applies alTop and alBottom before alLeft
and alRight.

Some widgets may override default rules.

Mattias




More information about the Lazarus mailing list