stringgrid的颜色显示? 请问:我想在程序运行时,在stringgrid的cells中依次输入采来的数据,而当采到当前的一格时,要改变这个的底色(或有颜色变化),该怎么做? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TSearchanger_Form.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);begin with StringGrid1.Canvas do begin tmp:=stringgrid1.Cells[ACol,ARow]; StringGrid1.Canvas.Brush.Color:=clred; TextRect(Rect,ACol,ARow,StringGrid1.Cells[ACol,ARow]); DrawText(Handle, PChar(tmp),length(tmp),Rect, DT_CENTER); end;end; procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);begin if (Acol = 1) and (ARow = 1) then begin StringGrid1.Canvas.Brush.Color := clRed; StringGrid1.Canvas.FillRect(Rect); end;end; 请问:我想在程序运行时,在stringgrid的cells中依次输入采来的数据,而该怎么做?采集数据写入 cells 太快!没有颜色变化的视觉效果的!另:如果 当采到当前的一格时,改变这个的底色(或有颜色变化),而此前 格子颜色恢复本色!这还要求你stringgrid的cells中写入数据是否是有序的。 怎样实现在Edit中输入内容后立即搜索出相关内容并在下面显示出来 两个DBGrid显示相关联的内容 怎样将这个函数封装成dll ,供PB调用?? 请高手帮忙!自动生成问题!急!! 打字系统,显示文本文件里的字,是用什么控件呀 DataModule里可以写procedure和function吗? 在Rave中如何打印页号? 50分请问HLP型帮助文件用什么软件制作,最好提供下载地址。 怎样发布软件? 超级难题!如何对系统属性中的某一个项目进行操作! 大侠们救命,如何在dwg文件 中添加文字或另一张dwg图 错误提示信息
ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
with StringGrid1.Canvas do
begin
tmp:=stringgrid1.Cells[ACol,ARow];
StringGrid1.Canvas.Brush.Color:=clred;
TextRect(Rect,ACol,ARow,StringGrid1.Cells[ACol,ARow]);
DrawText(Handle, PChar(tmp),length(tmp),Rect, DT_CENTER);
end;end;
Rect: TRect; State: TGridDrawState);
begin
if (Acol = 1) and (ARow = 1) then
begin
StringGrid1.Canvas.Brush.Color := clRed;
StringGrid1.Canvas.FillRect(Rect);
end;end;