On Sat, 19 Feb 2011 23:58:36 +0100 Hans-Peter Diettrich <[email protected]> wrote:
> Mattias Gaertner schrieb: > > >>> Does the VCL automatically change the Anchors? > >> tested with turbo delphi. > >> > >> No the anchor is not changed. > >> but the behaviour is consistent. > >> > >> The Anchors are not used if size changes from autosize > > > > If the VCL AutoSize ignores parts of the other layout settings then for > > me this sounds "inconsistent". > > IMO LCL AutoSize tries to be too clever. In fact an "inner" resize, > required to e.g. adjust the required width of an label, should be > separated from an "outer" resize/realign, forced by a resize of the > container. That would contradict the rule that AutoSize:=true adapts to the bounding box of the children. > Extensions like AnchorSides and ChildSizing may look nice, but should be > added only when really needed. Otherwise they can adversely affect > requirements of specialized controls or containers. When a (text) > Alignment has to be taken into account, this cannot be implemented in a > common (TWinControl) class, because not all controls have such a > property, in fact every control class can have its own properties that > should steer their size and placement. When such an DoAutoSize method is > virtual, every overridden implementation can add whatever additional > layout information is required. DoAutoSize is virtual. > In the most useful model every control would have its own (configurable) > layout manager, selectable from an (extensible) number of predefined > layouts. In fact the DockManager already *is* such an *installable* > layout manager... A TDockmanager is somewhat more. But I think a TLCLLayoutManager could be done similar to this. Maybe TDockManager should be made a descendant of a TLCLLayoutManager. > I wonder how one can implement installable DockManagers, and at the same > time insists in non-installable layout managers :-( > > > > Cross platform forms require a consistent layout engine. > > The form layout is always under control of the application, not affected > by the target at all. > > When you mean an consistent adjustment, required for changed language or > theme, then I agree. But multiple themes are not a matter of platforms, > and have to be handled by Delphi for Windows as well. I hope so. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
