No update after BeginUpdate/EndUpdate

227 Views Asked by At

Using ScatterGraph from National Instruments Measurement Studio and Visual Studio 2012.

To prevent the graph to update in various cases I generally block repainting of the component by calling scatterGraph1.BeginUpdate;

But sometimes I want the component to be repainted ones, so I use the following code:

scatterGraph1.EndUpdate; //Allow update
scatterGraph1.Invalidate();
scatterGraph1.BeginUpdate; //Block update again

The problem is that the graph does not update when I do the above. I suspect the problem to be caused by the graph component using separate threads, and thereby I call BeginUpdate before the graph has managed to repaint.

Question 1: Am I right when I think the problem is that BeginUpdate is called too fast after calling Invalidate?

Question 2: What could I do to force the update?

0

There are 0 best solutions below