Michael Van Canneyt schrieb:

I wonder how you want LCL code to use a dropped layout component. When no predefined property exists, every TWinControl had to be searched for an according component, whenever a layout method or property shall be accessed.

I would use a mechanism similar to the datalink. As soon as you tell the layout manager to manage a certain control, a hook is installed in the
control.

And where do you want to store layout specific information?

With a dedicated LayoutManager property, all anchor-docking related stuff could be moved from TWinControl into the AnchoredLayoutManager, and DockManager could be replaced (or merged with) the LayoutManager. In further steps the DockClient list could be removed, the Controls list can be used instead. Delphi compatibility can be maintained by delegation to the still existing elements.

The reason I don't want to introduce the layoutmanager property is that it
simply does not make sense for all TWinControls. a TEdit does not need a
layoutmanager, only the parent of the TEdit needs one.

There is much stuff that doesn't make sense for all controls.


What should be complicated, when the Delphi layout manager is one of multiple available managers? How do you want to implement different layout management for parts of a form?

Simply drop 2 layouters, and point them to the right parts of the form.

With the result that the form is crowded with layouters :-(

Not to mention prefabricated controls, e.g. with horizontal or vertical layout.

DoDi


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

Reply via email to