level 5
流声音乐坊
楼主
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
StringGrid1.Canvas.Brush.Color:=clgreen;
StringGrid1.Canvas.FillRect(rect);
StringGrid1.Canvas.Pen.Color:=clred;
StringGrid1.Canvas.TextOut(rect.Left,rect.Top,'测试');
end;
这代码明明写的是输出红色文本,可运行的结果始终是黑色,头大了。。。。。
2014年03月22日 01点03分
1
Rect: TRect; State: TGridDrawState);
begin
StringGrid1.Canvas.Brush.Color:=clgreen;
StringGrid1.Canvas.FillRect(rect);
StringGrid1.Canvas.Pen.Color:=clred;
StringGrid1.Canvas.TextOut(rect.Left,rect.Top,'测试');
end;
这代码明明写的是输出红色文本,可运行的结果始终是黑色,头大了。。。。。