Weird GroupBox Behaviour

Controls like groupboxes can be drag of the form, they then get
assigned to a temporarely CustomForm.

But something weird is going on with a scrollbox.

If a GroupBox1 is dragged into a scrollbox for the first time is docks
as it is supposed to do... but then

When the GroupBox1 is dragged again, it 'undocks' it startings
floating ?

Then if the GroupBox1 is dragged again, it docks.

So GroupBox1 keeps docking, undocking, docking, undocking.

NOW COMES THE REALY WEIRD PART !

If a SECOND GroupBox2 that is ALREADY in the scrollbox is
'dragged/moved' it just moves...

GroupBox2 doesn't undock, it moves ?!  I like that...

NOW IT BECOMES EVEN MORE WEIRD !

AFTER the SECOND GroupBox2 has been moved. The FIRST GroupBox1 can now
also be moved ?

( GroupBox1 stops docking/undocking and it can be moved ? )

HOW WEIRD !

Why doesn't GroupBox1 do this the first time ?

To re-create the sample do the following:

1. Create a new application

2. Add a scrollbox to the form.

3. Add a GroupBox1 to the form.

4. Add a GroupBox2 to the scrollbox.

5. Set the property 'DockSite' of scrollbox to true.

6. Set the properties 'DragMode' and 'DragKind' of GroupBox1 and
GroupBox2 to 'dmAutomatic' and 'dkDock'.

7. Run the application.

Now comes the weird part:

8. Drag GroupBox1 into the scrollbox

9. Drag GroupBox1 around in the scrollbox...

        Notice the weird behaviour.

10. Drag GroupBox2 around in the scrollbox...

        Notice the cool behaviour.

11. Drag GroupBox1 around in the scrollbox...

        Weird huh ?!

Do you know what is causing this ?
----------------------------------------------------------------------

UDP Speed Test is free software for windows 95 and up.

( A Java version is under development :) )

Use it to test the receive speed of a computer.

Two computers are needed for accurate results.

UDPsend can also be used as a traffic generator.

Surf to:

www.mycgiserver.com/~skybuck

~ = tilde ( under the escape key )

Happy downloading !