0

*using bcb6 (borland) c++ builder

I did paint box and in OnPaint event of this method I draw axis system.

In addition, in this form I have timer and in timer method I draw lines, but I want that in each time only one line will be on the axis system, means, I want to erase the line before I draw the next line.

I tried to do: paintbox1->canvas->invalidate() in the timer method but it doesn't work.

any ideas what can be the solution for that?

Thanks!

user687459
  • 143
  • 5
  • 17
  • anybody can assist please? – user687459 Aug 12 '15 at 21:20
  • add code, so we can see what kind of gfx you use `(back buffering, sequential rendering, ...)` anyway you should have just single draw routine per gfx object (you can call it from anywhere even from timer) because when you mix more then one you could get stuck with `Update()` calls invalidating your contents ... sometimes calling `PaintBox1->Upate()` before problematic gfx change helps (it removes scheduled repaint by calling it directly so when you draw again it will not get overpainted...) if you have a backbuffer you can paint to it and on some timer just copy to to paintbox ... – Spektre Aug 13 '15 at 06:17
  • Possible duplicate of [paintbox doesnt paint from timer method c++ builder borland](http://stackoverflow.com/questions/31976785/paintbox-doesnt-paint-from-timer-method-c-builder-borland) – Remy Lebeau Dec 09 '15 at 01:02

0 Answers0