10-12-2009 12:35 PM
I am trying to change the x axis maximum range based on the user input from a textbox. I am not sure how to do this. If anyone has any insight, please let me know. I am programming in C#.
Thanks!
Solved! Go to Solution.
10-12-2009 12:42 PM
Hello -
To do this, you'll need to create an assign a new Range object - something similar to the following:
NickB
National Instruments
10-12-2009 01:15 PM
Hi,
Thanks for getting back to me. I used your code that you provided and it did not work. Do I need to add something. This is my code:
waveformGraphTap.XAxes[0].Range = new Range(0, 1000);
And I get the following error messages:
'System.Data.Range' is inaccessible due to its protection level
The type 'System.Data.Range' has no constructors defined
Thanks again for the help!
10-12-2009 01:40 PM
Hello -
It looks like you need to either add "using NationalInstruments.UI;" to the top of your source file, or you need to fully qualify your "new Range(0, 1000);" statement, so that it looks like "new NationalInstrument.UI.Range(0, 1000);"
NickB
National Instruments
10-12-2009 02:31 PM
Thank you that worked!! Thanks for the help!