Docking problems

2003-12-16 05:49:39 PM
I'm developing an app in which I need to move a TButton in a form by
drag'n'drop with mouse.
at runtime I set
Button1->DragKind = dkDock;
Button1->DragMode = dmAutomatic;
while Form1->DockSite = true;
If I anchor Button1 with the mouse and move it in the Form1 the first time,
is all ok. If I repeat this operation the second time, the button is
designed in a little ToolWindow and not in the Form1, the third time in the
form and so forth.
I'd like to drag'n'drop buttons in my form, without appearing other windows.
If I use 2 buttons and I move one time Button1 and one time Button2, after I
can move Buttons without the issue of ToolWindow.
Someone can help me?