tags:

views:

28

answers:

1

I have an application that consists of a set of tabs. Each tab has an indpenedent user-control.

Currently the users can press a "New Window" button. This button creates a new form and moves the user control from it's current tab into the new form.

Instead of the button, users would like to simply drag the tab out of the current window like we do with web browsers. How would I go about doing that?

+1  A: 

It doesn't seem too trivial to expect a full solution here, but... who knows :)

Some thoughts: start with enabling dragging of tabs. When user drags a tab "enough" away from its original location you remove the tab from its origin and create a new window (or some other UI to show it being dragged) containing the contents of the tab.

When the tab is dropped - create the new window (or use the "dragging" one) and set it up the way user expects it.

arconaut
I was expecting to detect when the drag was outside the window boundry, but just going for X pixels makes a lot of sense. Can you tell me how to enable draging?
Jonathan Allen
There are already some libraries written to simplify this, but I still do it the dull way - listening for MouseDown + MouseMove...
arconaut