• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing cursor while dragging

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please let me know if this is the right thread to post this topic.

I have a JSP displaying a image with a button to allow measurement between two points. The cursor needs to be clicked on one point and dragged to the other. While dragging, the cursor changes to the one of windows ( cirlce with cross black line ). Can anyone suggest me a way so that the cursor remains to same while dragging as it was prior to start of drag.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use CSS to change the cursor (cursor:crosshair is the one it sounds like you want). I'm not sure off the top of my head if you can add an :active style to the image or if you'll need to use JavaScript onmousedown to activate the style change.

Hope that helps!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Set the css: http://www.echoecho.com/csscursors.htm

Eric
 
amol l a lekurwale
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric,
Thanks for your response. I have a measurement tools, which has its cursor set programatically. The problem I am facing is that when I click on the measurement tool, I get to see that cursor. But when I click and drag for measurement between two points, it changes to cross hair, which I want to keep same as that of the preset cursor.
 
amol l a lekurwale
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any updates for the changing cursor at the dragging event?
reply
    Bookmark Topic Watch Topic
  • New Topic