09-21-2012 05:56 PM
Hi,
I have two cursors which are associated to the same plot. In a certain moment, I need to associate those two cursors to another plot (plot is the same for both) so I do the following:
foreach (XYCursor cursor in MyScatterPlot.cursors)
{
cursor.Plot = newPlot;
}
So, the problem is that first cursor in the iteration is not updated with the new plot but the second cursor is updated correctly with the new plot... so I do not understand why the first cursor is not updated..... any ideas?
If it try the following:
MyScatterPlot.cursors[0].Plot = newPlot;
MyScatterPlot.cursors[1].Plot = newPlot;
The behaviour is the same: first cursor is not updated with the new plot but second cursor is updated correctly with the new plot.
I'll highly appreciate if anybody can help me.
Thx.
Solved! Go to Solution.
09-26-2012 01:37 PM
The problem was:
Once the plot property for first cursor was modified, at another point of my code this property was being modified later.
Sorry.
@tonitpp wrote:
Hi,
I have two cursors which are associated to the same plot. In a certain moment, I need to associate those two cursors to another plot (plot is the same for both) so I do the following:
foreach (XYCursor cursor in MyScatterPlot.cursors)
{
cursor.Plot = newPlot;
}
So, the problem is that first cursor in the iteration is not updated with the new plot but the second cursor is updated correctly with the new plot... so I do not understand why the first cursor is not updated..... any ideas?
If it try the following:
MyScatterPlot.cursors[0].Plot = newPlot;
MyScatterPlot.cursors[1].Plot = newPlot;
The behaviour is the same: first cursor is not updated with the new plot but second cursor is updated correctly with the new plot.
I'll highly appreciate if anybody can help me.
Thx.