Select to view content in your preferred language

Interface for mouse cursor symbols?

865
3
08-10-2010 08:44 AM
DavidNewman
New Contributor
I haven't been able to find documentation on this, if it exists. Is there a programmatic way to connect symbols to the mouse cursor in the way that the "Create Features" pane does? I've looked at ISystemCursor, but it doesn't appear to control that functionality.

Thanks,

>>Dave
0 Kudos
3 Replies
vincentLahaye
Emerging Contributor
Hi,

i don't know if it's what you are looking for, but this line change cursor to an hourglass cursor mouse

System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;


Other type of cursor are available.  Normal cursor is Cursors.Default

Vincent
0 Kudos
DavidNewman
New Contributor
Thanks, but I'm not looking for the standard cursors. I'm trying to change the cursor to match the symbol of a map feature.
0 Kudos
AlexanderAnkrah
Deactivated User
Hi,

If you've not already solved this you can do something like this on your onmousedown event.

function changeCursor(cursors) {
    switch (cursors) {
        case "pan":
            dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndopen.cur'),crosshair";
            down = dojo.connect(map, "onMouseDown", function(evt) {
                dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndclosed.cur'),crosshair";
            });
            dojo.connect(map, "onMouseUp", function(evt) {
                dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndopen.cur'),crosshair";
            });

            //dojo.byId("map_zoom_slider").style.cursor = 'default';
            //dojo.byId("map_infowindow").style.cursor = 'default';
            //dojo.byId("navToolbar").style.cursor = 'default';
            break;
            
            }
            
            }
0 Kudos