怎样使得stringgrid中的表头中的文字居中显示,而其后的数据靠左对齐,并小1号字? 如题,标题的字大一些,粗体并居中下面格子里面的数据字小一些,并靠左对齐。谢了,各位高手。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 嗯分高, 写代码, 在 StringGrid 的 OnDrawCell 事件中写到var Canvas: TCanvas; s: string;begin Canvas := (Sender as TStringGrid).Canvas; s := (Sender as TStringGrid).Cells[ACol, ARow]; if ACol = 0 then begin Canvas.Font.Style := [fsBold]; DrawText(Canvas.Handle, Pchar(s), Length(s), Rect, DT_CENTER) end;end; 请教一个字符串转字节数组的问题 求,储存过程!挑战耐心,挑战技术 求远程DELPHI家教! DLL高手请进,数据模板问题 ***菜单权限控制:源码奉送*** 请教如何利用SQL语句将一条记录从一个FOX数据库中追加到另一个一模一样的数据库中。 求助,delphi 5中stringgrid组件是否支持多行选择?如果能,请问怎么设置其属性阿? 请问deiphi再处理ini文件的时候是用那些函数? 编程——男儿也因当自强!!(网络签名、调查、言志。) delphi 10 移动开发如何保存密码和读取保存的密码? 如何判断inputbox是点击的ok还是cancel? activex控件的关联图标!
Canvas: TCanvas;
s: string;
begin
Canvas := (Sender as TStringGrid).Canvas;
s := (Sender as TStringGrid).Cells[ACol, ARow];
if ACol = 0 then
begin
Canvas.Font.Style := [fsBold];
DrawText(Canvas.Handle, Pchar(s), Length(s), Rect, DT_CENTER)
end;
end;