I added some code to CellBackgroundPaint and CellTextPaint events, this way only the cell I click get the blue background and white letters, but I see that the text ‘moves’ when I click on a cell (just a little bit to the left):
I had to add this code to CellTextPaint to stop the text from moving:
g.ForeColor = &c000000
g.DrawString(Me.cell(row,column),x,y)
Return True
I guess I’m only doing part of what the event does, so adding the code make all the text draw with the same information. Without it I draw the selected row and everything else is draw by the built in code.
I don’t know if this slow down the Text painting. Is there another way (code) to put to my event to stop this ‘movement’?
Note: look at the number column and the Enero column, you can see that the numbers move a little to the left when I click on a cell.