UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically control cursor images

Hey,

I'd like add a custom image to a cursor in a polar plot. I can't find any information of how to do that. Maybe it's not possible?

Any ideas of a workaround? Can I control another object and place it on top of the plot?

Best regards

Fred

0 Kudos
Message 1 of 6
(5,444 Views)

Hello,

What did you mean for a cursor ?

  1. Cursor of the mouse
  2. Cursor X-Y like in a Wfm Graph

As I know, there is no possibilities for item 2. But for item 1, you have the posibility to change the cursor with a VI scripting property, but only LV cursor (and a few others) like in Tools palette.

Maybe you must add superpose an other image (custom cursor) to your polar plot.

I hope it helps a bit..

Fred

0 Kudos
Message 2 of 6
(3,603 Views)

Ah, sorry!

Cursor X-Y in a graph is what I mean. I already know that the cursor of the mouse can be changed, that's why I wonder if it can be done for the graph cursors as well.

Thanks for the post

0 Kudos
Message 3 of 6
(3,603 Views)

I think your best bet would be to place your image in a simple BD object (e.g. customise a flat square button). Then you can detect cursor events from your XY graph and use them to update the position property of your customised button.

Personally I would consider placing the button *behind* the XY graph (graph transparent), since otherwise it might obscure your ability to interact with the graph in other ways...

0 Kudos
Message 4 of 6
(3,603 Views)

Thanks fabric,

I will try that!

0 Kudos
Message 5 of 6
(3,603 Views)

You could also use the plot images to achieve this.

1. Find out the cursor position relative to the Plot bounds

2. Read the image that you want to plot at the cursor position

3. Change the rectangle of the image so that the Left and Top are the position of the cursor and Right and Bottom are offset to retain the image size. Based on the image size, you can add an extra offset if you want to center align the image with the cursor, or otherwise want to offset the image in any direction.

4. Use the Draw Flattened Pixmap.vi to set the Plot Images.Front (or Back, Middle) to this image.

0 Kudos
Message 6 of 6
(3,603 Views)