Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Are there any events thrown while manually editing the Min/Max axis values ?

I'm working with the ScatterGraph, in which the user can set the Min/Max values of the YAxis manually.

After setting the:

YAxis.InteractionMode = ScaleInteractionMode.EditRange

 

After the range has been set, I'm catching the YAxisRangeChanged event to update my data.

 

When the user is in the process of entering the value, the label might loose the focus by moving the mouse over another control.

I'm looking for a way to know, that the user has entered the YAxis libel to edit it.

Is there any event that is thrown when the label becomes editable?

 

Thanks in advance.

 

0 Kudos
Message 1 of 4
(3,839 Views)

Hi,

 

Have you taken a look at the SimpleGraph example that ships with Measurement Studio? This example uses an event handler for when the user clicks to edit the range of the graph. This Example can be found in the following location:

 

Visual Studio 2005- C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS2005\DotNET\Examples\Application\SimpleGraph

 

Visual Studio 2008- C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS2008\DotNET\Examples\Application\SimpleGraph

 

-Adri

 

 

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 2 of 4
(3,818 Views)

Thanks,

 

I've checked the samples that you noticed, they were no much of help to me.

To centralize my question a little bit, say you set the graph interaction mode like this:

this.mainWaveformGraph.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY)
| NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint)
| NationalInstruments.UI.GraphInteractionModes.PanX)
| NationalInstruments.UI.GraphInteractionModes.PanY)
| NationalInstruments.UI.GraphInteractionModes.DragCursor)
| NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption)
| NationalInstruments.UI.GraphInteractionModes.EditRange)));

 You have events like pan and zoom that catch your "Shift + click" or "Ctrl + click" events and you can handle them.

What you don't have, and that's what I'm looking for, is event for when you click on the Max value in the YAxis/XAxis scale and you edit it.

Only after you've edited it, you'll get an event for "RangeChanged", and you'll not even know whether it was fired after your manual change or any other change that could happen to the graphRange (like zoom, pan etc.)

 

Regards

0 Kudos
Message 3 of 4
(3,814 Views)
You are correct that for the event YAxisRangeChanged or XAxisRangeChanged, the events will register no matter if they are done manually or by pan/zoom. There are no events that register just manually changing the scale though. If you are wanting a certiain section of code to run only when the axis is manually changed, you would have to include some logic within the RangeChanged event to check and see if anything else (pan/zoom) has changed to determine what triggered the event.
0 Kudos
Message 4 of 4
(3,803 Views)