[Lazarus] Testing 0.9.29

Martin lazarus at mfriebe.de
Sat Feb 19 18:04:19 CET 2011


On 19/02/2011 16:14, Mattias Gaertner wrote:
> On Sat, 19 Feb 2011 15:34:10 +0000
> Martin<lazarus at mfriebe.de>  wrote:
>
>> [...]
>>>> Now tested and found a minor bug in TLabel:
>>>> 1. Put label on form
>>>> 2. Set Alignment=taRightJustify and Autosize=true
>>>> 3. Enter text and observe that the label is still anchored on its
>>>> *left* hand side (expands to the right).
>>> What is the state of Anchors?
>>> If it is set to akLeft, then the behavior is correct.
>>>
>>>
>>>> In Delphi labels that have taRightJustify will automatically
>>>> expand/contract on the left side so the right edge is fixed.
>>> Does the VCL automatically change the Anchors?
>> tested with turbo delphi.
>>
>> No the anchor is not changed.
>> but the behaviour is consistent.
>>
>> The Anchors are not used if size changes from autosize
> If the VCL AutoSize ignores parts of the other layout settings then for
> me this sounds "inconsistent".
>
> What happens when you set Anchors to [akRight,akTop] in VCL?
Well depends on consistent with what...

Delphi only looks at the anchors, if the parent changes.
Delphi doesn't have anchorsides.

taLeftJustify => the left side of the label follows the anchor
   taLeftJustify,   akLeft,   => the   "labels left"   stays at a fixed 
distance to the   "parents left"
   taLeftJustify,   akRight => the   "labels left "  stays at a fixed 
distance to the   "parents Right"

taRightJustify => the right side of the label follows the anchor
   taRightJustify,  akLeft,    => the   "labels Right"    stays at a 
fixed distance to the   "parents left"
   taRightJustify,  akRight  => the   "labels Right"   stays at a fixed 
distance to the   "parents Right"

Anyway, I only answered the question that was previously asked: WDD?


Of course with anchorsides (and explicit anchoring to other controls). 
this is different ......





More information about the Lazarus mailing list