|
There is a problem with your code. In the Drawcell event, it is the event triggered by drawing each cell.
Think about whether your code has failed!
Remove the loop, and directly use the parameters Arow and Acol to represent the currently drawn rows and columns,
Talk about your code problem,
1. Rect already has such a parameter in the event, how do you still define it above?
2. Remove from circulation
3. Draw the cell and write it like this. Change this sentence:
Canvas.TextOut(rect.left, rect.top, Cells[j, i]);
To:
Canvas.TextRect(Rect,Rect.left,Rect.top,Cells[Acol,Arow]); |
|