Zitat von Hans-Peter Diettrich <DrDiettrich1@aol.com>:

> Vincent Snijders schrieb:
> >> Exactly this code will cause an exception, when the procedure is called
> >>  more than once - as I need it to create multiple floating controls.
> >
> > Why do you want to give the controls names?
>
> Names are convenient to identify floating windows (label title bars) or
> docked controls (dock header label), and are required for the
> de/serialization of docking layouts.
>
> But you are right in so far, as dynamically created controls are of
> little use in the recreation of a docking layout. In this case the names
> should be hardwired somehow, so that the appropriate controls can be
> created from the stored layout. I'll have to re-think this issue in the
> implementation of multiple editor windows and the related forms. Then
> e.g. the code explorer windows etc. must be linked to the edit control
> in their dock site, regardless of their name in creation order.

Welcome to the complex world of layout restoration. ;)

Just an idea:
The anchor docking manager has one component per docked control. It allows to
set a unique name and will use by default the component name. The manager will
resolve conflicts by appending a number. The user can set the name via the
designer and a translated name for i18n.


Mattias


