# Vision: Set Cursor icon manually

**URL:** <https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069>\
**Category:** Ignition\
**Created:** [June 24, 2019, 10:27pm UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069 "2019-06-24T22:27:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 24, 2019, 10:27pm UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069/1 "2019-06-24T22:27:04Z")

</div>

I want to use an image in the Image Management area to set the cursor icon to, but when I set it to the image, the cursor disappears altogether. Am I getting the path wrong?

My image is stored in the Image Management under: `Cursors/green.png`

My code to set the cursor is:

```auto
from java.awt import Toolkit, Point

tk = Toolkit.getDefaultToolkit()
img = tk.getImage("Cursors/green.png")
c = tk.createCustomCursor(img, Point(event.source.parent.getX(), event.source.parent.getY()), "img")

event.source.parent.setCursor(c)

```

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jlivingston](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jlivingston](https://forum.inductiveautomation.com/u/jlivingston)\
**Post date:** [July 2, 2019, 3:50pm UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069/2 "2019-07-02T15:50:06Z")

</div>

You seem to have neglected saying which version of Ignition, as in 7.9.11 or 8.03 that is in use. I have noted the .awt and would guess that the specific Java or Azure install would also be relevant. Post a response here, because I am guessing that the programmers look for number of participants before selecting questions to answer. For them, this should be easy with the information I requested… G’Day!

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [July 2, 2019, 7:19pm UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069/3 "2019-07-02T19:19:47Z")

</div>

You will need to get the image like this:

```auto
from java.awt import Toolkit, Point
from com.inductiveautomation.ignition.client.images import ImageLoader

tk = Toolkit.getDefaultToolkit()
img = ImageLoader.getInstance().loadImage("Cursors/green.png") 
c = tk.createCustomCursor(img, Point(event.source.parent.getX(), event.source.parent.getY()), "img")

event.source.parent.setCursor(c)

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 2, 2019, 10:27pm UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069/4 "2019-07-02T22:27:58Z")

</div>

Awesome, thanks for the help! That works, although a minor correction, line 6 should use img and not myImage.

Cheers!

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [July 19, 2023, 6:28am UTC](https://forum.inductiveautomation.com/t/vision-set-cursor-icon-manually/26069/5 "2023-07-19T06:28:40Z")

</div>

where is the code inserted? in Scripts \> mouseEntered?
