Michael Van Canneyt schrieb:
In Delphi, you can make dock zones along the edges of your
form by dropping 4 panels and aligning them along the edges of the form.
If autosize=true, then they have size 0 when the app is run (not when
designed), but you can dock controls on them, since there is a "fuzzy"
zone of 10 pixels.
Such DockSites should work without AutoSize, because their extent is
determined by the DockManager - which is not involved in autosizing. The
free extent of an elastic docksite should be user-adjustable, by means
of an splitter. They worked until now, at least with the Win32 and gtk2
widgetsets.
The influence rectangle of a docksite is the control's rectangle,
extended by 10 pixels in every direction. It it used only in the
determination of the target site, not in the layout.
No code is needed, and you can then dock toolbars etc. along the edges
of the form.
Code is needed to extend and shrink the sites - also in Delphi. The
docked size of the controls is not normally useful to determine the
extent of a docksite, instead the DockManager controls the layout of the
site, by adjusting all docked controls to the given extent of the site.
Unless someone has a better idea for dock zones around the edge of a form
without having to write code...
I already asked for an (user selectable) layout manager some time ago.
Such a manager would replace or include docking managers, that
essentially control the *layout* of a docksite, while docking itself is
only a minor addition. Then AutoSize should be handled by the applicable
layout manager, and anchor docking will become just another layout
manager. A stable algorithm and protocol (API) has to be established,
that allows all layout managers to work together.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus