Class wwDragPanel

The wwDragPanel is a specialized panel that can be dragged around the page and is optionally closable as an absolute positioned control. Draggable Panels can be very useful in AJAX applications that pop up additional 'windows' and display information in these windows.

A typical drag panel layout looks like this:

<ww:wwDragPanel runat="server" id="DragPanel"  
                   Draggable="true" closable="true"
                   CssClass="blackborder dragwindow" 
			style="display: none;width: 450px; "
  <div id="DragPanel_Header" class="gridheader">Drag Test</div>
  <div id="DragPanel_Content" style="padding:20px;">
     What's your name:<br>
     <ww:wwWebTextBox runat="server" id="txtName" />
     <input type="button" value="Check it out" onclick="SaySomething();" />

The key to making a panel draggable is the DragHandleID property which points at the element that is used as the initiator of the drag operation when the mouse is held down. Typically you'll want to use a header panel as shown in the markup above, but you can assign the DragHandleID also to the panel itself which makes the whole panel act as the drag handle. The names of the IDs are up to you - there's no enforced pattern.

Keep in mind that dragging a panel will make it's positioning absolute and keep it that way. If you don't want to have your panel affect the relative page layout, start your panel off as an absolute positioned control by specifying style="position:absolute".

Since wwWebDragPanel inherits from wwWebPanel it's a standard Web Control container and can contain either static text or controls that are updated through server code.


Class Members



Flag that determines whether a closebox is rendered into the <div> specified as a drag handle.


Optional Image used for close box if ShowCloseBoxOnDragHandle is true.


Determines whether this panel is draggable


The Control Id (DOM or Server) of the control that acts as a drag handle or area that the mouse can tag onto to drag the control. Typically this is a header or in some cases the control as a whole.


Optional client script handler called when the window is closed.


The location of the wwScriptLibrary Script File - WebResource/EmbeddedInPage or script Url


If set to a non-zero value adds a drop shadow to the panel. Note: Adding a drop shadow makes the panel absolute positioned.


Sets the opacity of a shadow if ShadowOffset is set to a non-zero value. The opacity is given in a fractional percentage.


Assembly: webcontrolsjquery.prg

© West Wind Technologies, 1996-2024 • Updated: 03/27/14
Comment or report problem with topic