Drag and Drop for VGUI
This is a drag n drop tutorial since it barely documented.
It's very easy, all you need to have is have two panels; receiver and droppable panel.
Now we need to assign receiver and droppable functions for the panels
Receiver metamethod takes three arguments, first one being the name of the DnD so it can receiver all droppable panels that have the same name as the receiver, callback function which gets executed as soon as a droppable panel is hovered over the receiver (if you want to detect it as soon as it was dropped, use isDropped argument) and last one is a table of strings that will act as a menu if drag'n'drop was performed with a right click.
Use the callback function for your stuff, setting position of the dropped panel or whatever you wanted to do.
Check Panel:Receiver for more information about the receiver metamethod.
The droppable method only takes one argument and it's the name of the receiver you want to drop it on.
More information at Panel:Droppable
Now you're able to drop droppable onto receiver.