大家好,我想在GRID上动态画线,已实现差不多了,代码如下,可是一拖动GRID的水平滚动条,就会出现多条LINE,求高手帮忙诊断,谢谢!procedure TForm1.Button1Click(Sender: TObject);
var
  line: TShape;
begin
  line := TShape.Create(grid1);
  line.Parent := grid1;
  line.Pen.Color := clred;
  line.Pen.Style := psdash;
  line.Shape := strectangle;
  line.Height := 222;
  line.Width := 1;
  line.Left := 100;end;