garrynewman/garrysmod — pull request #835 by KrakenZ (2014-11-13 23:16:25+00:00)
Title: DHorizontalScroller: Added draggable elements support

* Changed the canvas panel into a **DDragBase** to support draggable elements.
* Made left and right buttons aligned on bottom.

```lua
-- If set to true, will automatically move the dragged element.
DHorizontalScroller:[Set/Get]UseLiveDrag( bool )

-- By default, the DHorizontalScroller doesn't allow dragging elements.
-- If you call this with a string, all childrens will be draggable.
DHorizontalScroller:MakeDroppable( string )

-- Show / Hide the pink drop targets ( default is false )
DHorizontalScroller:SetShowDropTargets( bool )

-- To be overridden. Called when an internal draggable element got modified (i.e moved).
DHorizontalScroller:OnDragModified()
```

Here is what it looks like on the tabs of a simple DPropertySheet with the following used functions
```lua
MyDPropertySheet.tabScroller:MakeDroppable( "Tabs" )
MyDPropertySheet.tabScroller:SetUseLiveDrag( true )
```
![Example](http://i.imgur.com/hYOajAI.gif)