如何解决TStringGrid单元格闪烁不停的问题?
实现了stringGrid1DrawCell函数,
但好象问题不在这儿.
问题点数:100、回复次数:5Top
1 楼Libran()回复于 2003-09-03 00:30:22 得分 50
你在stringGrid1DrawCell事件里一定做了什么会使StringGrid进行重绘的操作,反过来会再次产生OnGrid1DrawCell事件,造成循环了,才会使单元格闪烁不停Top
2 楼goldencode()回复于 2003-09-03 12:59:41 得分 0
Sorry I can't type in Chinese now.
Yes, I think so. but how can I control this? That means how can
I get to know which draw action is really need? Could you
give me any suggestion? Thanks!
Top
3 楼Aweay(别问我问题,2年不用忘光了)回复于 2003-09-03 13:30:46 得分 50
At first, you can Set DoubleBuffer as True, of course ,this property must be exists in parent of stringGrid, if so, VCL will enhance drawing ability as using dobule buffer.
and second, DrawCell event provides a variant named Rect what specified an area to draw, thus, you should implement your code and your drawing according to this area.
Top
4 楼GodBirdFlying(飞翔天堂鸟)回复于 2003-09-03 14:40:25 得分 0
studying......Top
5 楼goldencode()回复于 2003-09-04 23:24:48 得分 0
发现问题:
我在DrawCell中画了按钮,
如果改变按钮的宽度就会给父控件发重画的消息,
父空间会重画表格,
表格调用drawcell,
形成循环,
解决办法在其他地方设置宽度.
Top



