TStringGrid重画问题(0分)

  • 主题发起人 主题发起人 spear
  • 开始时间 开始时间
S

spear

Unregistered / Unconfirmed
GUEST, unregistred user!
我把TStringGrid的DefaultDrawing置为false,
并写了OnDrawCell事件,但在循环中使用以下程序代码时
with StrGrid do begin
//OnDrawCell := nil;
Cells[0, RowCount-1] := IntToStr(RowCount-1);
Cells[1, RowCount-1] := Cell1;
Cells[2, RowCount-1] := Cell2;
Cells[3, RowCount-1] := Cell3;
Cells[4, RowCount-1] := Cell4;
RowCount := RowCount + 1;
if RowCount >= VisibleRowCount then
TopRow := RowCount - VisibleRowCount;
//OnDrawCell := StrGridDrawCell;
end;
会引起StrGrid在每次循环时都会从第一行重画到最后一行,而我的程序只需要重画
TopRow到最后一行即可。
请到http://www.delphibbs.com/delphibbs/dispq.asp?lid=1204188拿分
 
后退
顶部