最近做个系统,打算在StringGrid控件的第一行表头画倒三角形,在OnDrawcell事件中写如下代码,不过运行的时候,只实现在表头的第一个单元格里画倒三角形,请各位大侠帮忙看看是什么原因。procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
     stringgrid1.canvas.Brush.Color   :=clred;
       if ARow=0 then
       begin
         StringGrid1.Canvas.MoveTo(48,Rect.Bottom-5);
         StringGrid1.Canvas.LineTo(58,Rect.Bottom-5);
         StringGrid1.Canvas.MoveTo(58,Rect.Bottom-5);
         stringgrid1.Canvas.LineTo(53,rect.Bottom-1);
         StringGrid1.Canvas.MoveTo(53,rect.Bottom-1);
         StringGrid1.Canvas.LineTo(48,rect.Bottom-5);
       end;
end;