So far in this chapter we've focused on the functionality provided by the Drag-and-Drop utility. Let's shift our focus back to the interface controls section of the library and look at one of the components which is related very closely to drag-and-drop—the Slider control.
A slider can be defined using a very minimal set of HTML. All you need are two elements: the slider background and the slider thumb, with the thumb appearing as a child of the background element:
<div id="slider_bg" title="the slider background"> <div id="slider_thumb" title="the slider thumb"> <img src="images/slider_thumb.gif"></div> </div>
These elements go together to form the basic Slider control, as shown in below:
The Slider control works as a specific implementation of DragDrop in that the slider thumb can be dragged along the slider background either vertically or horizontally. The DragDrop classes are extended to provide additional properties...