Dynamically positioning a TArrowTool
Posted: Fri Feb 02, 2018 12:17 pm
Hi
I've searched your archives but find no reference to the TArrowTool.
I have placed a number of arrow tools in a chart like this:-
On resizing the chart I want the arrows to remain right-aligned and I though that this code would do it but it causes an exception.
Is it possible?
Bruce.
I've searched your archives but find no reference to the TArrowTool.
I have placed a number of arrow tools in a chart like this:-
On resizing the chart I want the arrows to remain right-aligned and I though that this code would do it but it causes an exception.
Code: Select all
procedure TfmCorrelationGraph.ChartAfterDraw(Sender: TObject);
var
pt1 : TPointXY;
pt2 : TPointXY;
begin
pt1.X:=Chart.Width-120;
pt1.Y:=16;
pt2.X:=Chart.Width-80;
pt2.Y:=16;
ChartTool8.FromPoint:=pt1;
ChartTool8.ToPoint:=pt2;
end;
Bruce.