[Lazarus] TControlSizing.Size is not symmetric!?
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Wed Sep 28 07:04:34 CEST 2011
Reading the TControlSizing.Size property does not return the written
value, instead it increases it by Around.
This will cause
cs.Size[side] := cs.Size[side];
to increment the stored size by Around, for every invocation!
Is this really intended behaviour???
While GetSpace and SetSpace have equivalent names, GetSpace adds Around.
GetSideSpace (called by GetSpace) returns the stored values instead.
For symmetric behaviour
property Space[Kind: TAnchorKind]: integer read GetSpace write
SetSpace;
should be replaced by
property Space[Kind: TAnchorKind]: integer read GetSideSpace write
SetSpace;
Also:
procedure Change(InnerSpaceChanged: Boolean); virtual;
ignores the argument. The method is virtual, of course, but where is it
ever overridden?
DoDi
More information about the Lazarus
mailing list