I have a strange problem. (Delphi 7)
I have an mdichild with a single form on it. The form contains a tchart with align=alClient.
I am doing some drawing on the tchart in the onAfterDraw event. If I do chart.invalidate, the drawing works perfectly.
However, if I do this
var
tst:tRect
begin
tst:=chart1.boundsRect;
invalidaterect(chart1.handle,@tst,false)
end;
nothing happens. invalidateRect is a windows API command that allows you to invalidate only certain portions of a window. Since I chose the whole boundsRect, it should repaint the whole window. but it doesn't.
Of course, eventually, I only want to repaint small parts of the window, but can you tell me how to properly use invalidateRect with Tchart.
How To implement InvalidateRect
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
Hi David,
it does not work with TChart component if it's double-buffered. To make it work you have to set the BufferedDisplay property to false :
Chart1.BufferedDisplay:=False;
it does not work with TChart component if it's double-buffered. To make it work you have to set the BufferedDisplay property to false :
Chart1.BufferedDisplay:=False;
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact: