Share via


Click and Drag Text to a New Location

Command:  OtherContextMenus.DragandDrop.MoveHere
Versions:  2008,2010
Published:  4/7/2010
Code:  vstipEdit0041

 

Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!

 

Text can be easily moved around in the editor by simply selecting it and moving the cursor to a new location.  Start with something you want to move, like a method:

image

 

In this case, I would probably also collapse the code to make it easier to select and move:

image

 

Now just select the text then click and drag (left mouse button) to move the cursor to the destination:

image

 

And release the mouse button to finish the move to the new location:

image

 

This technique can also be used to move text from one file to another.  Just select the text then click and drag your mouse pointer over the tab for the new file:

image

 

Even though you get the funky can't drop indicator, it will switch to the new file.  Just keep holding the mouse button down and move the cursor to the new location:

image

 

Then release and you are all set.