[Lazarus] RE : Right-aligned word wrap label doesn't seem to work

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Nov 27 12:27:56 CET 2011


On Sun, 27 Nov 2011 12:00:13 +0100
"Ludo Brands" <ludo.brands at free.fr> wrote:

> > It flows correctly when I set alignment to taCenter
> > What am I doing wrong?
> > 
> 
> Nothing. Seems to be a bug on windows. GTK2 is working.
> 
> Checking this in lazarus I stumbled on another compatibility issue with
> TLabel. Delphi states "When WordWrap is True, the width of the label is
> fixed. If AutoSize is also True, changes to the text cause the label to
> change in height. ". Lazarus increases the width... SVN 33665

The LCL extends the Width if possible.
A fixed Width can be set with Constraints.Min/MaxWidth or using Anchors.
The label will extend the Height if WordWrap is true and the Width is
fixed.

That means the LCL does not need any special rule for TLabel.

This has also the advantage that a LCL wordwrapped TLabel can
resize in both directions.

So, the LCL is more consistent and more powerful. So I would prefer to
break Delphi compatibility here.


Mattias




More information about the Lazarus mailing list