LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limit control to property of a waveform graph

I have a waveform graph in which I would like to limit practically all the property of the contextual menu. Such as:

Visible items, Auto scale X and Y...

There is a way to do that. By setting "Disabled" to 1.

My problem: I would still like to let the user change the Y scale by double clicking it.

Thanks

Nitrof
0 Kudos
Message 1 of 2
(2,448 Views)
Nitrol,

Unless I'm mistaken (it happens), the only way to really do this is completely disable all functionality and add the functionality back through your front panel. I would suggest a very easy approach by putting two digital controls (or one array with two elements, or a cluster, or...) which would be the min and max of the Y scale. You can even make it more simple by just adding a Property Node of the graph, selecting the Y scale, and creating a control. That would save you a lot of work. It wouldn't be as neat and tidy, but it would get the job done with the least amount of work.

If you want to know how to do this exactly as you specified, here goes:

Place a picture control over the y scale of the graph. Make the picture invisible (the "T"
color for the frame and the drawing area. Then, with the picture selected, move it to the front. Next, in the diagram, get the mouse down data from the Mouse property in a while loop. Throw the mouse down data into a shift register. Make the loop have a delay (wait) of about 200ms. AND the output of the mouse down button with the previous one. When the output is true (of the AND), stop the loop. You have detected a double click of the Y scale. NOW, you have to add a subVI that pops up (dialog) options for the Y scale. The user will change the scale, and then you can input these into the Y scale of the graphs property node. Yes, its quite complicated, but the results are exactly what you are looking for.

Of course, I always recommend the KISS principle (Keep It Simple Stupid).

Good luck
0 Kudos
Message 2 of 2
(2,448 Views)