Recent

Author Topic: Lazarus Release 3.2 - TLabel + Alignment=taRightJustify + AutoSize=True  (Read 438 times)

LacaK

  • Hero Member
  • *****
  • Posts: 691
Hello,
in Lazarus 3.2 I noticed changed behavior of TLabel when Alignment=taRightJustify and AutoSize=True.
Label is expanded (autosized) to right side instead to left side as it was prior.
When AutoSize=False then label is expanded to left side as expected.
Is it bug in 3.2?

Edited: Anchors are akLeft, akTop. When changed to akRight then it works as expected.
« Last Edit: March 05, 2024, 09:48:39 am by LacaK »

wp

  • Hero Member
  • *****
  • Posts: 12466
I think this already has been changed in v3.0 (https://wiki.freepascal.org/Lazarus_3.0_release_notes#TLabel:_autosized_and_right-aligned).

For me, the behaviour that you desribe (an auto-sized, right-aligned label with anchor akLeft growing to the left) is wrong because the anchor defines the side of the control which should not move in resizing operations.

LacaK

  • Hero Member
  • *****
  • Posts: 691
Thanks.
May be that I overlooked it in 3.0 as time distance between 3.0 and 3.2 was small ...
I will update as recommended in https://wiki.freepascal.org/Lazarus_3.0_release_notes#TLabel:_autosized_and_right-aligned

 

TinyPortal © 2005-2018