|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
GUI: locating mouse on graph indicator
I'm working on another non-FRC project. The idea is that you can draw a waveform on a graph, and hear it played. However, instead of drawing a continuous curve, I figured it'd be easier to just select some points, and spline fit between them.
So, part of that involves converting the location of the mouse into the point on the graph, and that's where I'm having some trouble. It mostly works, but there's some scaling and offset issues. I've attached the subVI and the testing VI. NOTE: If you do not understand control references, event structures, and property nodes, the code may be quite confusing. EDIT: I forgot the attachement. Thanks Tanner. Last edited by kamocat : 18-06-2010 at 22:20. |
|
#2
|
||||
|
||||
|
Re: GUI: locating mouse on graph indicator
No attachment is present.
-Tanner |
|
#3
|
||||
|
||||
|
Re: GUI: locating mouse on graph indicator
Looks like a) the coordinates for Plot Bounds are Panel-relative, rather than control-relative, so you're accounting for the control offset twice and b) since the mouse coordinate origin is at the top-left, the offset/scaling for the y-axis is reversed. The version I've attached seems to work.
--Ryan |
|
#4
|
||||
|
||||
|
Re: GUI: locating mouse on graph indicator
Thank you.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Final Data graph!!! Just take a peek!! | Jedward45 | Scouting | 0 | 12-03-2010 22:21 |
| how to graph joystick inputs as a function of time? | Guopeter | NI LabVIEW | 2 | 09-02-2009 17:49 |
| Locating Extra Motors | ilustrus | Motors | 0 | 13-01-2006 16:41 |
| Optical Mouse / Ball Mouse | Clark Gilbert | Chit-Chat | 26 | 22-07-2004 13:17 |
| Haas CNC Mill Graph Function | P-Dog | Technical Discussion | 9 | 13-03-2004 23:45 |