locked
change cursor style by png RRS feed

  • Question

  • Hi ,

      I am developing Windows Store App by html/js.

      I can change element's cursor style by .cur file  (document.getElementById("xxx").style.cursor = 'url("/lmove.cur"), auto';

      However, i cannot change cursor style by an PNG file or  canvas.toDataURL()

      Pls kindly comment if there is soultion to create cursor style dynamically.

      Tks.


    - Slash

    Thursday, January 24, 2013 8:49 AM

Answers

  • Hi,

    I have test on my side. And document.getElementById("xxx").style.cursor="pointer" is working normal.

    <!DOCTYPE html>
    <html>
    <body>
    <p>Mouse over the words to change the cursor.</p>
    <span style="cursor:auto">auto</span><br />
    <span style="cursor:crosshair">crosshair</span><br />
    <span style="cursor:default">default</span><br />
    <span style="cursor:e-resize">e-resize</span><br />
    <span style="cursor:help">help</span><br />
    <span style="cursor:move">move</span><br />
    <span style="cursor:n-resize">n-resize</span><br />
    <span style="cursor:ne-resize">ne-resize</span><br />
    <span style="cursor:nw-resize">nw-resize</span><br />
    <span style="cursor:pointer">pointer</span><br />
    <span style="cursor:progress">progress</span><br />
    <span style="cursor:s-resize">s-resize</span><br />
    <span style="cursor:se-resize">se-resize</span><br />
    <span style="cursor:sw-resize">sw-resize</span><br />
    <span style="cursor:text">text</span><br />
    <span style="cursor:w-resize">w-resize</span><br />
    <span style="cursor:wait">wait</span><br />
    </body>
    </html>

    Please post some related code if there still has problem.

    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Thursday, January 31, 2013 12:45 PM
    Thursday, January 24, 2013 10:48 AM