Hi,
I found a problem at the activation of TNearestTool.
I'm using this tool like this : when the key CTRL is down the tool TNearestTool is activated, and when the key CTRL is up the tool TNearestTool is hidden.
A problem appears when I push the key CTRL without moving the mouse. The position found by the function GetNearestPoint is good but the line which is drawn between the mouse and the point is not visible or in a wrong position.
Of course as soon as the mouse is moved the problem is corrected but the effect is very disagreeable.
Do you have a solution to correct this bug ? I try with the functions Repaint of the graph and the tool but without success.
Thanks
Franck
Problem at the activation of TNearestTool
Hi Franck,
you can use the following trick :
you can use the following trick :
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
ChartTool1.Active:=not ChartTool1.Active;
SetCursorPos(Mouse.CursorPos.X,mouse.CursorPos.Y); // trick
end;
Pep Jorge
http://support.steema.com
http://support.steema.com