[Lazarus] Align property confusion

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Oct 4 23:28:35 CEST 2010


Mattias Gärtner schrieb:

> Borland implemented a limited, but visually easy to understand system.
> 
> IMO Borland did a few things wrong, but Align was a good idea.

I like it, because it keeps things simple :-)

> Of course adding an optional more flexible layout engine would be an 
> even better idea.

We already have different layout managers, some of which are called 
"docking managers" - what IMO is wrong when they do not really handle 
drag-dock operations. A docking manager is a layout manager, that *also* 
allows to add/remove components interactively.

The handling of Add, Remove and Resize events is a common task of all 
layout managers, and it's unimportant *how* these events occured (in 
code or interactivly). A form designer also is kind of an docking 
manager, with only a different persistency model (component streaming) 
for the final state.

It would not be very complicated to retype the DockManager property into 
TLayoutManager, with extensions for *all* tasks of an layout manager, in 
addition to the drag-dock handling. The only purpose of the DockSite 
property would be to enable/disable drag-dock features, activating the 
drag manager for that component. There is no special use for the 
UseDockManager property, except that it un/installs an non-default 
layout manager when changed. The DockClient* properties become obsolete, 
because all child controls are managed by an layout manager in any case; 
all additional layout information, used by e.g. anchor- or other 
docking/layout managers, can be moved out of the controls, into the 
layout manager class(es) - see TDockZone.

DoDi





More information about the Lazarus mailing list