Mattias Gärtner schrieb:

Borderspacing properties could be used too in all layouts (I can imagine) and for consistency I recommend that they are used - at least - in a similar way. This is more a design guide line.

IMO BorderSpacing should be implemented using the Delphi anchors.

Clearing properties IMO is not a good idea, when the user changes the layouter later.

AnchorSides are only for fixed and Align controls. This is special to the default LCL layouter. The same for ChildSizing.

Such specific properties may be moved into the according layouter, and should not burden standard layouts with unusable or inconsistent options.


I have trouble to find the direction of this thread, so I will repeat my proposal:

Every TControl gets a property "Layouter: TLControlLayouter". TLControlLayouter gets a bunch of methods. The most important ones are CalculatePreferredSize and AlignControls. CalculatePreferredSize computes the preferred size, which the parent layouter can use. AlignControls resizes/positions the child controls according to the current bounds. If Layouter=nil then the default layouter will be used.

IMO CalculatePreferredSize should have arguments (constraints), settable by the container (layouter). See my parallel mail.

Perhaps we should distinguish between "outer" layout managers, that handle almost regular (horizontal/vertical/grid) layouts, and properties that allow to position or size a control inside its determined cell. This would simplify the grid calculations, by leaving room for fine-tuning without influencing the determined layout cells.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to