02-24-2009 07:12 AM
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.
02-25-2009 07:53 AM
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
02-25-2009 08:37 AM
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
02-25-2009 02:52 PM