LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select a region in plot

Solved!
Go to solution

I may need to select a region in a plot as the attached screenshot.

 

When selecting it, a yellow or other color frame may appear. It can be rectangular or circle.

 

 

After the selection, the frame may disappear. And I may get the frame's position parameters.

 

May I know how to do it, thanks. 

0 Kudos
Message 1 of 6
(4,700 Views)

You could use cursors. If you have one cursor act as the upper-left corner and the other cursor as the lower-right corner.

See the attached example.

Cory K
Message 2 of 6
(4,657 Views)
You can also use property nodes to control when the cursors are visible or not.
Cory K
Message 3 of 6
(4,655 Views)

Thanks, but I may want to display the rectangular only when the mouse click and drag on the plot.

 

Is it possible to use the mouse down, move and up event with functions of drawing lines to do it.

 

Thanks.

0 Kudos
Message 4 of 6
(4,635 Views)

Have the mouse-down event programmatically make the first cursor appear.

Have the mouse-up event programmatically make the second cursor appear.

 

As for how to do it with lines... I'm not sure.

Cory K
Message 5 of 6
(4,631 Views)
Solution
Accepted by alex.
I just threw this together so there are a few kinks to iron out, but I think it should point you in the right direction.  It uses cursors and a background image, pull the handles (cursors) around to make a selection.  If you want the frame to disappear, or to select with just a frame, it is a simple tweak.
Message 6 of 6
(4,614 Views)