procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
s : String ;
begin
if (acol = 2) and(arow >0) then
begin
StringGrid1.Canvas.Brush.Color := clred;
StringGrid1.canvas.FrameRect(rect);
end ;
if (acol = 3) and(arow >0) then
begin
StringGrid1.Canvas.Brush.Color := clYellow ;
StringGrid1.canvas.FrameRect(rect);
end ;
Rect: TRect; State: TGridDrawState);
var
s : String ;
begin
if (acol = 2) and(arow >0) then
begin
StringGrid1.Canvas.Brush.Color := clred;
StringGrid1.canvas.FrameRect(rect);
end ;
if (acol = 3) and(arow >0) then
begin
StringGrid1.Canvas.Brush.Color := clYellow ;
StringGrid1.canvas.FrameRect(rect);
end ;
解决方案 »
- 好多免费的迅雷下载资源(电影)
- 如何知道当前文件管理器所在的目录?
- SocketConnection的奇怪问题!
- 如何把两个日期相减得到天数
- 我修改了DBCtrl.pas的 BtnTypeName: array[TNavigateBtn] of PChar的内容,结果变成了这样。如何解决?谢谢
- 奇怪的DCOM代码转COM+出现的异常,"DLLHOST.exe 地址异常错误",请高手作答!
- CreateThread怎样正确使用?
- 急!用什么API函数可以监控或记录对被删除的文件
- 这个SQL语句哪有问题?
- 请推荐一本COM方面的书。
- 怎样利用TADOStoredProc 来获取记录集!!!
- 问大家一下,关于报表的控件,什么最好用?答者有分!
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
s : String ;
begin
if (acol = 2) and(arow >0) then
begin
StringGrid1.Canvas.Brush.Color := clYellow ;
StringGrid1.Canvas.pen.Color := StringGrid1.Font.Color ;
StringGrid1.canvas.fillRect(rect);
StringGrid1.Canvas.textout(rect.left+1,rect.Top ,StringGrid1.cells[acol,arow]);
StringGrid1.Canvas.Brush.Color := clred;
StringGrid1.canvas.FrameRect(rect);
end ;
end;
end.