stringgrid问题 你可以使用cxgrid可能有些帮助。比stringgrid强很多。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如何在写表格时改变STRINGGRID.cells[i,j]的颜色【dcsdcs编写】我是通过继承下来,修改的procedure WMPaint(var Message: TWMPaint); message wm_Paint;procedure TdcsStringGrid.WMPaint(var Message: TWMPaint);varrt:TRect;tmpc:DWORD;beginPaintHandler(Message);if not(focused) thenbegin tmpc:=Canvas.font.Color; rt:=CellRect(selection.Left,selection.Top); canvas.Lock; canvas.FillRect(rt); Canvas.font.Color:=font.Color; Canvas.TextRect(rt,rt.Left+2,rt.top+2,Cells[selection.Left,selection.Top]); //canvas.TextOut(rt.Left+2,rt.top+2,Cells[selection.Left,selection.Top]); Canvas.font.Color:=tmpc; canvas.UnLock;end; TO : yesin163(破网)上面是在你回答之后我才回答的,这样允许吧!并且我的代码并不完美,完全可以继续改下去。 我开玩笑, ^_^ 不要生气。http://community.csdn.net/Expert/topic/5433/5433146.xml?temp=.643841 楼主可以参考这里:http://www.techfaqdb.org/p_5_c_11/t_5265359_c_11/ 个位高手上面说的都不错 先谢谢个位 如果要使文字自动折行 用drawtext() 让部分文字变色用canvas.textout() 可是我想实现的功能是 既能让部分文字变色 又能自动折行 请问个位高手该如何实现呀?? 做了7年的ERP开发,到头来找不着工作! 求高人指点!客户端与网站交互的问题~ FastReport中如何设置让生成的报表可以编辑?急!!!!!!!!!!! 小妹是新手,请各位多多指教!! 极度郁闷!放分! 问个简单的问题 如何注册一个OCX控件? 很难的问题,折腾了我一个月了 DecodeDate把date数据字段分开,反过来的那个函数叫什么名字? 如何通过bcb得到汉字内码!!(我用了好几种办法都是错的) 请求帮助 请教各位WINDOWS版本问题!
procedure WMPaint(var Message: TWMPaint); message wm_Paint;
procedure TdcsStringGrid.WMPaint(var Message: TWMPaint);
var
rt:TRect;
tmpc:DWORD;
begin
PaintHandler(Message);
if not(focused) then
begin
tmpc:=Canvas.font.Color;
rt:=CellRect(selection.Left,selection.Top);
canvas.Lock;
canvas.FillRect(rt);
Canvas.font.Color:=font.Color;
Canvas.TextRect(rt,rt.Left+2,rt.top+2,Cells[selection.Left,selection.Top]);
//canvas.TextOut(rt.Left+2,rt.top+2,Cells[selection.Left,selection.Top]);
Canvas.font.Color:=tmpc;
canvas.UnLock;
end;
http://community.csdn.net/Expert/topic/5433/5433146.xml?temp=.643841
如果要使文字自动折行 用drawtext() 让部分文字变色用canvas.textout()
可是我想实现的功能是 既能让部分文字变色 又能自动折行 请问个位高手该如何实现呀??