Intersoft WebDesktop Documentation
Walkthrough: Changing Cursor Effect Programmatically in Client Side
See Also Send Feedback
Intersoft WebDesktop > WebDragDropExtender > Features > Predefined Cursor Effects > Walkthrough: Changing Cursor Effect Programmatically in Client Side

Glossary Item Box

This walkthrough shows you how to change cursor effect programmatically in client side.

During this walkthrough, you will learn how to do the following:

 Prerequisites

In order to complete this walkthrough, you will need the following:

  • Visual Studio 2005 Application.

 Step-By-Step Instructions

To change cursor effect programmatically in client side.

  1. Launch Visual Studio.NET 2005.
  2. Click on File menu, then select New and click Web Site.
  3. Select ASP.NET Web Site in the Template box and set Location to HTTP.
  4. Named the Web Site and click OK.
  5. Right-click on Project's name and select Add New Item.
  6. Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
  7. Drag 6 ASP.Net Panel to WebForm.
  8. Drag WebDragDropExtender instance from ToolBar to WebForm.
  9. Set the BackColor of each ASP.NET Panel.



  10. Click on WebDragDropExtender instance and press F4.
  11. On DragControls property, click the (collection) to open WebDragControl Collection Editor. Set which panels that will become DragControl.



  12. On DropControls property, click the (collection) to open WebDropControl Collection Editor. Set which panels that will become DropControl.



  13. Implement OnDragOver client side event

    JavaScript Copy Code
    function WebDragDropExtender1_OnDragOver(controlId, dragEventArgs, dropObject)  
    {      
       var WebDragDropExtender1 = ISGetObject(controlId);        
       switch (dropObject.Element.id)        
       {             
          case "Panel6":                 
                  dragEventArgs.Effect = ISDragDropEffects.Copy;                 
                  break;             
          case "Panel4":                 
                  dragEventArgs.Effect = ISDragDropEffects.Move;                 
                  break;             
          case "Panel5":                 
                  dragEventArgs.Effect = ISDragDropEffects.Link;                 
                  break;             
          case "Panel3":                 
                  dragEventArgs.Effect = ISDragDropEffects.NotAllowed;                 
                  break;             
          case "Panel2":                 
                  dragEventArgs.Effect = ISDragDropEffects.Remove;                 
                  break;        
       }      
       return true;  
    }
    

  14. Run the project. You will notice the cursor effect when trying to drag the dragable panel and drop it to the dropable panel.


See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.