[Lazarus] Docking and Layout managers

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Feb 8 09:21:47 CET 2009


On Sun, 08 Feb 2009 07:50:50 +0100
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> I'd suggest a layout layer, between TControl and TWinControl, dealing 
> with child controls (e.g. TContainerControl). As Paul pointed out, a 
> TWinControl uses system resources (handles), which are not required
> for layout (and docking) managers.

TWinControl has childs, TControl has not. This is usually tested with 
if AControl is TWinControl then 

If a TContainerControl that is not a TWinControl has childs this
test will break.

 
> Then it would be possible to have lightweight panels, where currently 
> TPanel or similar TWinControl descendants have to be used for
> grouping controls together.
> 
> Delphi compatibility is not broken by such a layer. When the layout 
> management is implemented by a LayoutManager hook, as is already used 
> for DockManager, less (memory) resources are required for typical 
> (button...) components, which do not normally have child controls,
> but inherit all the data members and other bloat from TWinControl.


Mattias



More information about the Lazarus mailing list