StringGrid表格的文本颜色咋就改不了呢????????????
delphi吧
全部回复
仅看楼主
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
1