[Lazarus] Video: Docked Designer Test

Michael Van Canneyt michael at freepascal.org
Tue Nov 24 10:15:39 CET 2015

On Tue, 24 Nov 2015, Anthony Walter wrote:

> To those worried about components being cluttered on top of each other, do
> you really think it would be that difficult to address?
> All the docked designer implementation needs to do is assign a position
> (Left,Top) to new non-visual components (NVC), that is those added while in
> docked designed mode. If there is an existing NVC nearby it just picks the
> next available (Left,Top) in a grid for the new NVC. It's not that
> difficult.
> EG. repeat in an arbitrarily sized grid pattern ...
> Is there a NVC between 0,0 and 48,48? Yes?
> Is there a NVC between 48,0 and 96,48? Yes.
> Is there a NVC between 0,48 and 48,96? No?
> Okay then put the NVC at Left: 0; Top:48. Problem solved.

Well, your argument needs refinement, of course. Such as: 
- don't go outside form borders, meaning go to next column.
- maybe sort the NVCs prior to placement, so as to have some logic ?
   (on renaming this means re-order the grid)
- What if there are more NVCs than fit in your grid ?

> Next time a non docked designer using team member opens the project,
> they'll see a new component placed at 0,48. They can move it if they want.
> If the docked designer using team member goes back to working on said
> shared project, the placement of the NVCs will not be affected, because to
> him the NVCs positions on the form are never modified unless he adds a new
> NVC. If a new NVC is added while in docked design mode, go back to EG.
> above.
> Not that hard.

No-one said it is hard.


1. It needs to be addressed *before* you enable this 'NVC outside form' option.
    Usually this is where things go wrong.

2. I place my NVC at meaningful or logical positions, or positions which don't disturb from finding the controls underneath.
    The above is basically arbitrary placement, which is very uncomfortable and doesn't make for fast finding of components.

So please bear with me and allow me to be slightly skeptical:
Not everyone thinks the docked form is the best thing since sliced bread, to put it mildly :-)


More information about the Lazarus mailing list